Update: Looks like subtrees are a nicer alternative to submodules. Anyway..
- To update all submodules:
git submodule update --init --recursive
- To fetch the latest code from a submodule:
git commit -am "bumping up submodule version"
Then merge the code. The next time the parent repository is pulled,
updating the submodule will get the latest commit in it.
- Instead of a normal pull, try this:
git pull --rebase origin master
git add <some-file>
git rebase --continue
From here: https://gist.github.com/hongymagic/6339056
First add this to
.git/config under the
fetch = +refs/pull-requests/*:refs/remotes/origin/pull-requests/*
Then fetch the pull requests:
Then checkout the one you want:
git checkout pull-requests/1000/from
git show --pretty=raw <commit>
Both these show similar information: the committer, the parent(s), commit text and so on.
Now that you have the two parents of a merged request (see above tip),
you can see all files changed between its two parents with a command
git diff --name-only <sha1> <sha2>
Put something like this in your
path = ~/.gitconfig.work
path = ~/.gitconfig.personal
If your work repos are in
~/work, you can have a separate user/email etc for
repos in that folder.
If you’ve reverted a recent commit with:
You can undo the revert with this: