Questions tagged [git-reflog]

For issues relating to the git-reflog command to manage information recorded in reflogs.

git-reflog is a command to manage the information recorded in the reflogs.

Reference logs, or "reflogs", record when the tips of branches and other references were updated in the local repository.

Syntax:

git reflog <subcommand> <options>
89 questions
0
votes
1 answer

git log --reflog vs git reflog

After playing around with rm etc etc, my git reflog no longer shows the past commits. However, git log --reflog is still able to show them. How does git log --reflog show dangling commits if it doesn't rely on git reflog?
Pacerier
  • 86,231
  • 106
  • 366
  • 634
0
votes
1 answer

Recover initial list of merge conflicts

When git encounters conflicts upon merging, a list is displayed, where every entry begins with CONFLICT and contains information about the reason of the conflict, like (renamed/deleted). I am looking for a way to retrieve this exact list after…
Koenigsberg
  • 1,726
  • 1
  • 10
  • 22
0
votes
0 answers

How do I recover a file deleted from git using filter branch and pushed to remote?

I recently cleaned out several files from my repository using git filter branch. These are the instructions I followed : https://help.github.com/articles/removing-sensitive-data-from-a-repository/. After that I rebased my development branch so that…
NSM
  • 35
  • 2
  • 5
0
votes
1 answer

Can git restore untracked files after a bad pull?

I have an artist working in git for a class project. He had an asset in a working directory that was untracked. Before he committed the file, he preformed a pull to get the latest changes. An upper level folder must have been renamed and during the…
EHMAN
  • 1
0
votes
0 answers

About to do scary changes to git repository - How to make sure I can revert to the current state?

I need to perform major operations on my git repository. I'm not yet sure that I will succeed, and I may need to use methods I'm not yet fully comfortable with. I expect to use a lot of merges, cherry-picks, --reset, rebases, and hopefully end up in…
pipe
  • 657
  • 10
  • 27
0
votes
0 answers

Why does git reflog show multiple batches of HEADs

I previously asked this but I closed it as it was a close duplicate of the same issue with git log. Now I have a similar question that why does git reflog show 'different lists of HEAD logs'? If I use keyboard to go down I see from HEAD0 all the…
mfaani
  • 33,269
  • 19
  • 164
  • 293
0
votes
1 answer

What does the long empty space in git reflog signify?

After reading here as far as I have learned git reflog will show a list of all heads, basically it will keep a history after every checkout you do. Right? What I don't understand is why are there long empty spaces between the list of heads? Also…
mfaani
  • 33,269
  • 19
  • 164
  • 293
0
votes
3 answers

How can I see how a Git branch changed over time (including history rewrites)?

Is there a way to see, for a given repo and branch, how that branch changed over time, including history rewrites? For example: April 1st: Commit A -> B -> C -> D April 2nd, Max Heiber—git push -f: Commit A -> B -> C' April 3rd, Somebody else—git…
Max Heiber
  • 14,346
  • 12
  • 59
  • 97
0
votes
0 answers

How to know which branch a spefic branch was rebased on to

I am using git reflog to get information about branches, as i need to know the name of the branch passed to the command. for example when using git rebase --onto master, I need to know that master branch is used for rebasing. the problem is that…
Mahmoud Adam
  • 5,772
  • 5
  • 41
  • 62
0
votes
1 answer

Backup local Git repository (notes, stashes, reflog included) and restore it on another machine

As in the title, how can I backup completely a local Git repository and its state, restore it on another machine, and have the new repository to be in the exact state as the one on the previous machine? I mainly care to not loose local stuff,…
Kamafeather
  • 8,663
  • 14
  • 69
  • 99
0
votes
0 answers

Dangling commit is not in reflog and won't purge by git gc

I got a dangling commit that is not in the reflog (or I use it wrong) and won't go away with git gc. Here is what I mean: % git fsck Checking object directories: 100% (256/256), done. Checking objects: 100% (5425/5425), done. dangling commit…
LeMike
  • 3,195
  • 5
  • 25
  • 35
0
votes
2 answers

why new head and old head have the same sha id using git reflog?

i think these should be two different HEADS, so why they corresponds to the same sha value, that is 2aad8cb ... git reflog 2aad8cb HEAD@{0}: checkout: moving from master to xxx_master 2aad8cb HEAD@{1}: clone: from git@github.com:xxx/xxx.git
hugemeow
  • 7,777
  • 13
  • 50
  • 63
-1
votes
1 answer

Using git reflog to find the state of the local repository before pull

I've been running a code on a local computer on my master branch in July last year. This code has been left untouched for the past 6 months and I've recently updated it with a pull. However, I'd like to find what was the commit of this branch before…
Thomas
  • 1
-1
votes
1 answer

How to undo very screwed Git merge and restore branch (accidentally turrned main into another branch and deleted the original)

The Problem OK, so, I had two branches: main and session In the main branch I developed the main code, in the session branch I developed code for a new session system. Occasionally, I merged main into session to keep it up to date. ("Merge branch…
1 2 3 4 5
6