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
1
vote
1 answer

Just get list of merge happened on my current branch in git

Is there any way in Git you can just list all Branch merge commmits? I tried with git reflog and it does show commit and HEAD@{2}: commit (merge): merge with feature/unification Is using (merge) string enough to detect branch…
wonderer
  • 53
  • 1
  • 5
1
vote
1 answer

Egit: Different Message in Reflog than Git Bash

I noticed a discrepancy between the way EGit records the reflog for a rest action, as compared to the way Git Bash records it. 28eab8d HEAD@{0}: commit: l 959126f HEAD@{1}: 959126fc7fbf887b3bdb5bd931f50c611f48bf71: updating HEAD f073b25 HEAD@{2}:…
Joseph K. Strauss
  • 4,683
  • 1
  • 23
  • 40
0
votes
1 answer

How to show git reflog in reverse order?

For git log, we have git log --reverse to show logs in the reverse order, but I tried git reflog --reverse, it returns fatal: options '--reverse' and '--walk-reflogs' cannot be used together. Is there any way to show git reflog in reverse order?
Wenfang Du
  • 8,804
  • 9
  • 59
  • 90
0
votes
1 answer

Will reverting using git reflog mess with history on other branches?

I messed up on a git rebase, but I've done a bunch of work in other branches since then and now I'm coming back to this. If I revert to a previous version with reflog, will that undo my other changes? ex curr i messed with other branch i miseed with…
Brandon-Perry
  • 366
  • 4
  • 18
0
votes
0 answers

Git restore branch with changed history

I created a branch git checkout -b myBranch I made 3 commits onto the branch, lets name then One, Twoand Three. I did an interactive rebase. git rebase -i origin/master With pick One drop Two drop Three and after dropping Two and Three I did a…
Jan Hackenberg
  • 481
  • 3
  • 14
0
votes
0 answers

Non required commit details in reflog query

I've below output from the --reflog $ git log --reflog --grep=Merge --oneline 29645bc (origin/master) Merge branch 'develop' into 'master' dd2977c (origin/develop) Merge branch 'jira2' into 'develop' 73f655b Merge branch 'jira3' into…
Annadate Piyush
  • 458
  • 5
  • 18
0
votes
1 answer

Fixing a force push on master

I mistankely force pushed an outdated version of master branch I had on local to remote and reverted a bunch of commits. To try to fix this, I cherry-picked all of the commits merged after the commit I reverted to and merged them into the master…
CarlosC
  • 1
  • 1
0
votes
2 answers

What's the best way to find old detached HEAD after repo sync?

Say that there are some local commits(A, A1, A2, A3) on the current detached HEAD which points to commit A, after repo sync, the local detached HEAD is overridden with the remote latest detached HEAD which points to commit B, what's the best way to…
Chen Li
  • 4,824
  • 3
  • 28
  • 55
0
votes
0 answers

understand how a commit is reachable

I deleted a branch and I was presuming that a certain commit (let's call it C) was no longer reachable. I was able to find the commit in question using git reflog. However, I am puzzled by the fact that that commit doesn't show up when I do: git…
Marcus Junius Brutus
  • 26,087
  • 41
  • 189
  • 331
0
votes
0 answers

How to find rebase from Github API

How can we find if a pull request had a rebase operation done? git reflog helps but we want to specifically discover this using Github API.
Thellimist
  • 3,757
  • 5
  • 31
  • 49
0
votes
1 answer

Access reflog subject with git rev-list (or any other plumbing command)

I'd like to access reflog subjects with a plumbing command. I'd expect: $ git rev-list --format='%gs' --walk-reflogs HEAD to give me what I want, but this just gives me output like: commit f1cb402488661fb3662ad876e98fcce991677333 commit…
alecbz
  • 6,292
  • 4
  • 30
  • 50
0
votes
0 answers

git fsck can't find dangling/unreachable commits

I have just reset --hard back by about 15 or so commits on a branch all the way back to first common parent with master, and deleted all other branches, tags etc on those 15 commits, confirming so with branch --contains. I wanted to initially…
0
votes
1 answer

Get reflog of Azure devops repo?

One of our refs has been moved to a commit where it shouldn't be, presumably because someone did a merge in the wrong direction or something like that. To sort this out (see what actually happened) it would be a great help to see a reflog for that…
Kjell Rilbe
  • 1,331
  • 14
  • 39
0
votes
1 answer

Fixing a messed up rebase merge commit

I remember doing something like committing my changes(on my feature branch) and merging with a remote branch (not master). Then in order to make sure my commit came on top of the merge commit I rebased the last two commits and changed the order. I…
thebenman
  • 1,621
  • 14
  • 35
0
votes
1 answer

Why the Git Bash shows nothing when i type command "git reflog"

When i type git reflog in the git bash, it show nothing. And when i select show reflog on the context manu of TortoiseGit, it says "error while loading reflog. libgit2 returned: unable to parse OID, contains invalid characters". The other…