News for hackers. Stuff that matters.
Re:Flight rules for Git by lixtra on Tuesday October 16, 2018 @12:27PM (#18230678)
Oh, I see. I created this great patch and commited it. Then I wanted to push it, but it reported some strange error.

I checked out master but now my commit is no longer there. HELP!

Can I somehow push my changes to you so you can fix it?

Ah let's intuitively try:

git log --graph --decorate $(git rev-list -g --all)

For comparisson:

- mercurial would show your commit all the time, no matter what currently is checked out.

- Only when you push, you have to force it, to create a new head in the remote repository because most workflows expect you to merge heads locally.

Re:Flight rules for Git by seba_dos1 on Tuesday October 16, 2018 @12:40PM (#18230806)
All I get from this comment is that "git reflog" should be one of the first things taught about git :P
Re:Flight rules for Git by lixtra on Tuesday October 16, 2018 @12:54PM (#18230943)
Maybe reflog would help. Unfortunately most cheat sheets I saw don't mention it.
Re:Flight rules for Git by craftyguy on Tuesday October 16, 2018 @02:01PM (#18231592)
As other comments here have suggested, git cheatsheets should be ignored if you are learning git.