Skip to main content

Questions tagged [git-reflog]

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

0 votes
0 answers
25 views

What is the difference between gc.pruneExpire, gc.reflogExpire and gc.reflogExpireUnreachable?

I want to extend the time old commits are kept around, to extend git's default "grace period" before garbage collects occurs. I don't want to keep all unreachable commits, such as the ...
Inigo's user avatar
  • 14k
-1 votes
2 answers
54 views

git reset head --hard deleted local files

I'm not sure where to start. I'm a beginner at git and trying to get the lay of the land. Today I was working on a project and did not commit. My last commit was yesterday. I got on my PC and decided ...
Jayy's user avatar
  • 15
1 vote
1 answer
45 views

Lost local files in directory while using Git push/pull

I'm running into the issue that my Github is not collaborating as I want. Yesterday, I tried to push my changes to a remote repository I created. However, I couldn't pull the repository because it ...
Koen ter Heegde's user avatar
-1 votes
1 answer
53 views

I want to bring back COMMITED but then deleted files on my local repository after doing git reset hard

I have staged and commited a very large folder (created and only present on my local repository) but then I did git reset hard to revert my big commit which was a mistake. However, luckily, I commited ...
Luc's user avatar
  • 1
0 votes
0 answers
31 views

Remove reset entries from git reflog (cleanup)

Is is possible to cleanup repo state so that reset history is removed from reflog? I did a bunch of reset-hard to find a bug, but then I want to go back to main master state... I mean, I'm kind of at ...
Nux's user avatar
  • 9,772
1 vote
2 answers
199 views

How to navigate git reflog in reverse order?

For git log, we have git log --reverse to navigate logs in the reverse order, but I tried git reflog --reverse, it returns fatal: options '--reverse' and '--walk-reflogs' cannot be used together. Is ...
Wenfang Du's user avatar
  • 10.5k
0 votes
1 answer
57 views

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? ...
branperr's user avatar
  • 432
0 votes
0 answers
40 views

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 ...
Jan Hackenberg's user avatar
1 vote
1 answer
208 views

How to restore deleted commits on pythonanywhere

I have accidentally deleted my commits on pythonanywhere.com and now I see very old state of my files. My Django website isn't working at all. What I did: $ git reset --hard HEAD~1 And then: $ git ...
Percival's user avatar
-1 votes
1 answer
109 views

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 ...
Thomas's user avatar
  • 1
0 votes
1 answer
267 views

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 ...
CarlosC's user avatar
1 vote
2 answers
170 views

git reflog - branch level summary

git reflog shows how HEAD moved between commits. Is there a way to show only branches? (i.e. show only one line per branch visit)
IndustryUser1942's user avatar
0 votes
1 answer
52 views

How can I tweak this git log command / bash script to include deleted commits from deleted branches that git reflog should still know about?

So I have this little bash script to output a csv file that shows all my commit history from a specific month. function make-git-report() { if [ "$1" != "" ] then local ...
Evert's user avatar
  • 2,110
0 votes
2 answers
151 views

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 ...
Chen Li's user avatar
  • 5,132
2 votes
0 answers
266 views

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 ...
alper's user avatar
  • 3,302

15 30 50 per page
1
2 3 4 5
7