git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Please provide help with how to fix

From
D. Ben Knoble <ben.knoble@gmail.com>
Date
Jul 16, 2026, 22:08 UTC
Message-ID
<CALnO6CDGkAzu4Xz2o=VaCfwsF1WEcBw2k3-JqmkGqj1+ZpRQyA@mail.gmail.com>
In-Reply-To
<BY5PR06MB6548F18EA532E3EF021AA93DBAC72@BY5PR06MB6548.namprd06.prod.outlook.com>
On Thu, Jul 16, 2026 at 4:52 PM Randy Kroeger <kroegerr@cseasy.com> wrote:
>
>
> I am having a bit of an issue trying to figure out the best route in fixing the following.
The advice I give my colleagues:
1. Don't panic
2. Figure out where you are
3. Figure out where you want to go
4. Decide how to get there
> What happened is on my second machine, in which was out dated (source code), I upgraded to VS 2026 (from 2022), then tried to do  a pull.  What happened was that I received a bunch of modifications, which was confusing. All I want is to pull all changes since I did last on this machine.  I then had a bit of a problem with the gitignore file, so I decided to just commit it (my train of thought is it is a file being committed to source control - that is it).  However, what happened is this file took on a life and decided to make itself the head and bypass all changes to the head in which it knew about last.  Please see image below where the history shows a line from this commit to the parent below.  This by passes a bunch of chances.
A suite of helpful "where am I" commands:
- git status: is the repo clean? before we go further, let's not lose work
- git log --graph [--oneline]: what's the shape of commits? (this
would be useful to copy/paste, optionally with annotations, in place
of your diagram below)
- git reflog HEAD: what operations brought me here, and what are some
interesting recent checkouts?
Then (repeating a line from a previous quote):
>  All I want is to pull all changes since I did last on this machine.

Once we know where you are, we can talk about where you want to go. When you say "pull all changes," do you mean a "fetch" (update my local repository's notions of where remote branches are) or a "pull" (merge or rebase local branches with/on their upstreams)?

> Question: How can I fix this issue?  I would like to restore all my changes again and remove this bypass.   I have been reviewing your documentation, but am very hesitant as my understanding, once again, may not match how GIT actually functions.

Only when you know where you are and where you want to go can you find appropriate fixes ;)

Show 12 quoted lines
> I greatly appreciate the help!
>
> In this example, Commit 3 was done on July 12 and since it was on a machine that had done its last pull on 6/09/2026, the commit created a new parent below Commit 5.  Now when I pull, the changes for Commit4, Commit5 are not included in the pull.    I am assuming I need to do a rebase, but am not 100% confident and in reading the documentation, I am still not confident.
>
> --Commit6 7/14/2026
> --Commit5  7/13/2026
> |<-Commit4  7/12/2026  -child
> |  --Commit2  6/11/2026
> |  --Commit1  6/10/2026
> |>-Commit4   7/12/2026  -parent
>
> Randy

I'm not sure how to interpret this diagram; perhaps you could use "git log --graph --oneline" to show your current and desired states?

-- 
D. Ben Knoble
Previous: Randy KroegerNext: Randy Kroeger
Message 2 of 5 in “Please provide help with how to fix”
  1. Randy KroegerJul 16, 2026
  2. D. Ben KnobleJul 16, 2026
  3. Randy KroegerJul 17, 2026
  4. Weijie YuanJul 17, 2026
  5. Randy KroegerJul 27, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.