by alexander white ©
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
#!/usr/bin/env bash | |
#Build and install neovim for Debian | |
#See: https://neovim.io/ | |
#See: https://github.com/neovim/neovim/wiki/Building-Neovim#quick-start | |
#See: https://gist.github.com/darcyparker/153124662b05c679c417 | |
#Save current dir | |
pushd . > /dev/null || exit |
Locate the section for your github remote in the .git/config
file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = git@github.com:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/*
to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:
As pointed out by @johntyree in the comments, using git reflog is easier and more reliable. Thanks for the suggestion!
$ git reflog
1ed7510 HEAD@{1}: checkout: moving from develop to 1ed7510
3970d09 HEAD@{2}: checkout: moving from b-fix-build to develop
1ed7510 HEAD@{3}: commit: got everything working the way I want
70b3696 HEAD@{4}: commit: upgrade rails, do some refactoring
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
#!/usr/bin/env python2 | |
# git-branch-io -- show incoming and outgoing commits | |
# | |
# Place this file somewhere in your PATH. | |
# | |
# Usage: git branch-io [branch] | |
# | |
# If branch is not given the current branch will be used. The script | |
# prints out how many commits should go in either direction to bring |