-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'bleeding-jumbo' of git://github.com/magnumripper/JohnTh…
…eRipper into bleeding-jumbo
- Loading branch information
Showing
28 changed files
with
1,068 additions
and
334 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
26a1e93
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@magnumripper sorry, I think this was a missed --rebase on a pull. I can not figure out how to purge this darn thing.
26a1e93
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jfoug
Apparently, the parent of your commit 8cb4bc2 was magnum's commit c0560a4 from 6 days ago.
Next time, when you notice (before pushing to the upstream repo) that you accidentally merged instead of pull --rebase, you can check your merge commit:
The
Merge: 8cb4bc2 939d6ce
line contains both your most recent local commit (HEAD) prior ro merging, and the most recent commit of the upstream repository.(You can verify this with
git show
, e.g.git show 8cb4bc2
.)To "undo" the merge in your repository, you can do a 'git reset`.
E.g., if you don't have any changes that are not committed or stashed (so no work should get lost), you can use
git log
will look like prior to your merge:Then, you can to a
git rebase
orgit pull --rebase
and push afterwards.(Of course, for commit 8cb4bc2 it is now too late.)
You may also consider adding these lines to your globale .gitconfig:
This will stash your local changes and force a --rebase whenever you pull.
I disabled this, because you loose the nice summary of changed files when pulling.
Instead, I usually do a
git fetch
and agit status
before pulling.26a1e93
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On this system, I do not have those settings in my .gitconfig for same reason (losing the summary). I simply forgot the --rebase.
26a1e93
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😠
26a1e93
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Losing the summary? We solved that problem half a year ago and correct settings was posted.
26a1e93
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now I'm depressed. I'll watch a movie instead.
26a1e93
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you have a pointer? (After you finished watching the movie)
26a1e93
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't remember and I can't find it now. It's probably in the commit comments of last fuckup.
In my john/.git/config I have
In the man page it looks like global option
merge.ff = only
would have same effect (the above is per branch)With these settings, you do get a summary. But when you do want to merge you need to say
--no-ff
.26a1e93
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
http://aaronbonner.io/post/78444674979/only-allow-git-fast-forward-merges-to-avoid-ugly
26a1e93
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, what do you recommend putting in my ~/.gitconfig (exactly), and what
git config ...
commands should I use?26a1e93
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
~/.gitconfig
The latter may be added using the command below
Or you just edit the file, same thing.
26a1e93
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With that setting, and nothing in the way for a clean pull:
But if you have local commits:
The downside is when you actually want to merge, you need to say
--no-ff
but that is not the common case anyway.
As always, if you try to push while not in sync:
When this happens you just
git pull --rebase
and try again.26a1e93
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added https://github.com/magnumripper/JohnTheRipper/wiki/Git-settings---tips'n'tricks
26a1e93
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The key to getting the summary is to NOT use this:
but to instead use this.
This will simply cause a pull to fail if a pull --rebase is required. Good stuff.
26a1e93
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So maybe we should add to the wiki that the former should be dropped (if there)
26a1e93
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You still do not get any summary if you do this (but with that in .gitconfig every pull was doing this)
git pull --rebase
It is the rebase process that scrubs the summary. But with the merge=ff we get a normal pull, but that pull will fail with a warning message telling you to rebase if the pull is not able to be done. But most pulls will get a nice summary.
26a1e93
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you need a rebase, there is no way to get a summary unless you rebase yourself first, something like this:
26a1e93
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No wait, that will not give you a summary either. I'm not sure it can be done.
Anyway, this new setting is much better than the old one. I'm quite happy with it.
26a1e93
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now I am getting this, and now sure WTF is going on :(
26a1e93
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
had some stuff in ~/.gitconfigure that needed cleaned out.
26a1e93
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like you didn't have an upstream set for your branch. You could use
git push -u origin bleeding-jumbo
once and it would be set for future pushes.