Questions tagged [reflog]

For issues relating to git reference logs, or "reflogs".

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

To manage reflog informations take use of the git-reflog command.

28 questions
2
votes
3 answers

Wrap Long git reflog Lines?

git reflog displays a single-line description, clipping it at the right margin. 74a8491 HEAD@{0}: checkout: moving from feature/x to feature/y 74a8491 HEAD@{1}: commit (merge): Merge branch 'feature/x' of https://github.com/ 949d0e4 HEAD@{2}:…
Brent Faust
  • 9,103
  • 6
  • 53
  • 57
1
vote
1 answer

which commit was cherry-picked?

How can you find out which commit was used in a cherry-pick operation? git reflog only seems to show the resulting commit Sha-1 after the cherry-pick is merged and commited. We need to find the original commit prior to that. Why? It's because we…
Wayne
  • 2,959
  • 3
  • 30
  • 48
1
vote
1 answer

Permanently delete a specific commit/stash from Git

I have an automated process that creates a temporary commit and stash, does some stuff, and then pops the stash and reverts the commit. After doing this a few times, the automated git gc complains that there is too much stuff for it to clean up, so…
Ed Bennett
  • 63
  • 8
1
vote
0 answers

How can I use `git reflog format` while showing it as sorted by date?

I want list use git reflog format, and show it as sorted by date with (--date=relative) flag. git reflog --format='%C(auto)%h %<|(17)%gd %C(blue)%cr%C(reset) %gs' has following output: $ git reflog --format='%C(auto)%h %<|(17)%gd…
alper
  • 2,919
  • 9
  • 53
  • 102
1
vote
2 answers

remove single git reflog entry by hash/id

I committed sensitive data to a single file on my main branch. I never pushed it. I can change HEAD to point to the previous commit with git reset HEAD^, but the commit is still hanging around as git reflog shows. How can I use the reflog hash/ID,…
nmz787
  • 1,960
  • 1
  • 21
  • 35
1
vote
2 answers

Can `git reset --soft` be used to undo secrets from a commit before pushing to a remote (Github)?

Suppose I have a git repo with app.py and I accidentally include an API key (or other secret) as plaintext in app.py in a commit that I have not yet pushed to a remote (lets say on Github). To undo and fix this commit locally, I could: git reset…
JWB
  • 38
  • 4
1
vote
3 answers

Getting the sha1 of a desired commit from a remote repository

Using git reflog, a user can only access his local reflog information? How can one see the sha1 of a desired commit from a remote repository?
Marius Butuc
  • 17,781
  • 22
  • 77
  • 111
1
vote
1 answer

Getting full commit history after git clone

I'm the lone developer on a project where I'm working across multiple computers, some on VM. After doing a git clone of my repo on gitHub, calls to reflog only show items after the clone. How can I update this new cloned repo to show the full…
RYS
  • 442
  • 6
  • 22
1
vote
2 answers

Can't recover commit from Git due to same sha in reflog

I'm trying to recover code because I accidentally switched to a branch in eclipse and lost all my data, somehow (I still don't know what I did). When I open up my git reflog in command line, I see: 6dc60f6 HEAD@{14}: commit: fixed class mismatch for…
NorthGuard
  • 953
  • 1
  • 7
  • 21
1
vote
1 answer

git rebase abort and empty reflog

I stupidly aborted a forgotten rebase with commits and uncommitted changes both on top of it, so it blew everything away, similar to questions like this. I know about the reflog and immediately went to look in there, however it contained only a…
Arkadiy Kukarkin
  • 2,153
  • 14
  • 24
0
votes
1 answer

Can an admin access my reflog to revert commit changes?

I recently made a commit and it was incorrect so I tried to reset it to another commit. Now I'm realizing that the commit had information we needed for our team. Can the GitHub organization's admin find that commit (from reflog) and get the…
bubble
  • 1
0
votes
2 answers

Solving git upstream rebase "hard case"

Wouldn't the git upstream rebase "hard case" problem be solved if each branch carried a reference to its initial base commit (say branch@{base}) ? This initial base commit (stored under branch..base in the config file, for example) would first…
CidTori
  • 351
  • 4
  • 17
0
votes
3 answers

git reflog. Is this an appropriate use?

this is hypothetical at the moment, but it's a workflow I would like to put into practice. I have a template that I start all of my web projects from. I am currently using github to store the master template, and simply cloning each time I build a…
Mild Fuzz
  • 29,463
  • 31
  • 100
  • 148
1
2