* [help] git status doesn't seem to work.
@ 2024-12-05 19:52 A bughunter
2024-12-05 20:02 ` rsbecker
2024-12-05 20:19 ` Jeff King
0 siblings, 2 replies; 4+ messages in thread
From: A bughunter @ 2024-12-05 19:52 UTC (permalink / raw)
To: git@vger.kernel.org
[-- Attachment #1: Type: text/plain, Size: 1415 bytes --]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
[help] git status doesn't seem to work. See how a pull caused updates after status showed "up to date"
```
~/Peeranoia_Framework $ git status
On branch main
Your branch is up to date with 'origin/main'.
nothing to commit, working tree clean
~/Peeranoia_Framework $ git pull
Enter passphrase for key '/data/data/com.termux/files/home/.ssh/id_ed25519':
remote: Enumerating objects: 17, done.
remote: Counting objects: 100% (17/17), done.
remote: Compressing objects: 100% (15/15), done.
remote: Total 15 (delta 4), reused 0 (delta 0), pack-reused 0 (from 0)
Unpacking objects: 100% (15/15), 6.41 KiB | 312.00 KiB/s, done.
From github.com:freedom-foundation"up to date"/Peeranoia_Framework
03edf66..4cf4f51 main -> origin/main
Updating 03edf66..4cf4f51
Fast-forward
README.md | 24 +++++++++++++++++++++---
1 file changed, 21 insertions(+), 3 deletions(-)
~/Peeranoia_Framework $ git status
On branch main
Your branch is up to date with 'origin/main'.
nothing to commit, working tree clean
```
from A_bughunter@proton.me
Sent with Proton Mail secure email.
-----BEGIN PGP SIGNATURE-----
Version: ProtonMail
wnUEARYKACcFgmdSBIIJkKkWZTlQrvKZFiEEZlQIBcAycZ2lO9z2qRZlOVCu
8pkAALjBAP45ZhMdBcf1zjdJRoyhz32ikG5ndCkNXFn95CpUH0txcwD/WuZQ
ZJCa46Cavsdv6ZL6kFm0w+KA9SEifL1N5eoYgg0=
=jjzN
-----END PGP SIGNATURE-----
[-- Attachment #2: publickey - A_bughunter@proton.me - 0x66540805.asc --]
[-- Type: application/pgp-keys, Size: 653 bytes --]
[-- Attachment #3: publickey - A_bughunter@proton.me - 0x66540805.asc.sig --]
[-- Type: application/pgp-signature, Size: 119 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [help] git status doesn't seem to work.
2024-12-05 19:52 [help] git status doesn't seem to work A bughunter
@ 2024-12-05 20:02 ` rsbecker
2024-12-05 20:19 ` Jeff King
1 sibling, 0 replies; 4+ messages in thread
From: rsbecker @ 2024-12-05 20:02 UTC (permalink / raw)
To: 'A bughunter', git
On December 5, 2024 2:53 PM, A bughunter wrote:
>[help] git status doesn't seem to work. See how a pull caused updates after status
>showed "up to date"
>
>```
>~/Peeranoia_Framework $ git status
>On branch main
>Your branch is up to date with 'origin/main'.
>
>nothing to commit, working tree clean
>~/Peeranoia_Framework $ git pull
>Enter passphrase for key '/data/data/com.termux/files/home/.ssh/id_ed25519':
>remote: Enumerating objects: 17, done.
>remote: Counting objects: 100% (17/17), done.
>remote: Compressing objects: 100% (15/15), done.
>remote: Total 15 (delta 4), reused 0 (delta 0), pack-reused 0 (from 0) Unpacking
>objects: 100% (15/15), 6.41 KiB | 312.00 KiB/s, done.
>>From github.com:freedom-foundation"up to date"/Peeranoia_Framework
> 03edf66..4cf4f51 main -> origin/main
>Updating 03edf66..4cf4f51
>Fast-forward
> README.md | 24 +++++++++++++++++++++---
> 1 file changed, 21 insertions(+), 3 deletions(-) ~/Peeranoia_Framework $ git status
This is exactly what git pull is supposed to do. The operation does not
leave files in an uncommitted state, so the message
>On branch main Your branch is up to date with 'origin/main'.
>nothing to commit, working tree clean
is 100% correct before and after the pull in your example.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [help] git status doesn't seem to work.
2024-12-05 19:52 [help] git status doesn't seem to work A bughunter
2024-12-05 20:02 ` rsbecker
@ 2024-12-05 20:19 ` Jeff King
2024-12-05 21:08 ` A bughunter
1 sibling, 1 reply; 4+ messages in thread
From: Jeff King @ 2024-12-05 20:19 UTC (permalink / raw)
To: A bughunter; +Cc: git@vger.kernel.org
On Thu, Dec 05, 2024 at 07:52:37PM +0000, A bughunter wrote:
> [help] git status doesn't seem to work. See how a pull caused updates after status showed "up to date"
>
> ```
> ~/Peeranoia_Framework $ git status
> On branch main
> Your branch is up to date with 'origin/main'.
This is comparing your branch with the local tracking branch we have,
refs/remotes/origin/main. It doesn't touch the network, and that
tracking branch is essentially a cache of the last value we fetched.
> ~/Peeranoia_Framework $ git pull
> Enter passphrase for key '/data/data/com.termux/files/home/.ssh/id_ed25519':
> remote: Enumerating objects: 17, done.
> remote: Counting objects: 100% (17/17), done.
> remote: Compressing objects: 100% (15/15), done.
> remote: Total 15 (delta 4), reused 0 (delta 0), pack-reused 0 (from 0)
> Unpacking objects: 100% (15/15), 6.41 KiB | 312.00 KiB/s, done.
> From github.com:freedom-foundation"up to date"/Peeranoia_Framework
> 03edf66..4cf4f51 main -> origin/main
> Updating 03edf66..4cf4f51
> Fast-forward
> README.md | 24 +++++++++++++++++++++---
> 1 file changed, 21 insertions(+), 3 deletions(-)
This pull is doing a fetch under the hood (since pull is essentially
"fetch + merge"). It updates the tracking branch origin/main, at which
point a "git status" would show that your local branch is not up to
date. But since it then immediately merges the result, you find that
afterwards:
> ~/Peeranoia_Framework $ git status
> On branch main
> Your branch is up to date with 'origin/main'.
...your branch is now up to date.
This is all working as expected. If you want a more up-to-date view of
"origin/master" when you run your "git status", try "git fetch" to hit
the network first.
You might also find more information in:
https://git-scm.com/book/en/v2/Git-Branching-Remote-Branches
-Peff
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [help] git status doesn't seem to work.
2024-12-05 20:19 ` Jeff King
@ 2024-12-05 21:08 ` A bughunter
0 siblings, 0 replies; 4+ messages in thread
From: A bughunter @ 2024-12-05 21:08 UTC (permalink / raw)
To: Jeff King; +Cc: git@vger.kernel.org
[-- Attachment #1: Type: text/plain, Size: 2645 bytes --]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
Good answer Peff. It answers a lingering question here https://lore.kernel.org/git/0fyZjFuLfvDKSV32a70rBZ4q-iPMLmZtv4ITVBuqoUbtyUiD9CAbaCFgOKNsSh9Rq0tMszzyT1-kqf9bsWroZxEJXW_-Fg-VvBHKUqfCZZM=@proton.me/
from A_bughunter@proton.me
Sent with Proton Mail secure email.
On Thursday, December 5th, 2024 at 14:19, Jeff King <peff@peff.net> wrote:
> On Thu, Dec 05, 2024 at 07:52:37PM +0000, A bughunter wrote:
>
> > [help] git status doesn't seem to work. See how a pull caused updates after status showed "up to date"
> >
> > ```
> > ~/Peeranoia_Framework $ git status
> > On branch main
> > Your branch is up to date with 'origin/main'.
>
>
> This is comparing your branch with the local tracking branch we have,
> refs/remotes/origin/main. It doesn't touch the network, and that
> tracking branch is essentially a cache of the last value we fetched.
>
> > ~/Peeranoia_Framework $ git pull
> > Enter passphrase for key '/data/data/com.termux/files/home/.ssh/id_ed25519':
> > remote: Enumerating objects: 17, done.
> > remote: Counting objects: 100% (17/17), done.
> > remote: Compressing objects: 100% (15/15), done.
> > remote: Total 15 (delta 4), reused 0 (delta 0), pack-reused 0 (from 0)
> > Unpacking objects: 100% (15/15), 6.41 KiB | 312.00 KiB/s, done.
> > From github.com:freedom-foundation"up to date"/Peeranoia_Framework
> > 03edf66..4cf4f51 main -> origin/main
> > Updating 03edf66..4cf4f51
> > Fast-forward
> > README.md | 24 +++++++++++++++++++++---
> > 1 file changed, 21 insertions(+), 3 deletions(-)
>
>
> This pull is doing a fetch under the hood (since pull is essentially
> "fetch + merge"). It updates the tracking branch origin/main, at which
> point a "git status" would show that your local branch is not up to
> date. But since it then immediately merges the result, you find that
> afterwards:
>
> > ~/Peeranoia_Framework $ git status
> > On branch main
> > Your branch is up to date with 'origin/main'.
>
>
> ...your branch is now up to date.
>
> This is all working as expected. If you want a more up-to-date view of
> "origin/master" when you run your "git status", try "git fetch" to hit
> the network first.
>
> You might also find more information in:
>
> https://git-scm.com/book/en/v2/Git-Branching-Remote-Branches
>
> -Peff
-----BEGIN PGP SIGNATURE-----
Version: ProtonMail
wnUEARYKACcFgmdSFkoJkKkWZTlQrvKZFiEEZlQIBcAycZ2lO9z2qRZlOVCu
8pkAABrFAQCbDOZHArmE9Tb1IEfKiptP1L2sKGjWvMRq2HcVzC1yfgD/Q83n
S+eVEQTC65XKGxb4a3v9RSOiXgFxfrAE6dBd+wY=
=ZGvg
-----END PGP SIGNATURE-----
[-- Attachment #2: publickey - A_bughunter@proton.me - 0x66540805.asc --]
[-- Type: application/pgp-keys, Size: 653 bytes --]
[-- Attachment #3: publickey - A_bughunter@proton.me - 0x66540805.asc.sig --]
[-- Type: application/pgp-signature, Size: 119 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-12-05 21:08 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-05 19:52 [help] git status doesn't seem to work A bughunter
2024-12-05 20:02 ` rsbecker
2024-12-05 20:19 ` Jeff King
2024-12-05 21:08 ` A bughunter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).