sourceforge -> github
[wiki.git] / git.mdwn
1 [[!toc levels=3]]
2
3 ## Howto
4
5 ### How to tell which files git is tracking
6
7     git ls-files
8
9 See also http://stackoverflow.com/questions/2405305/git-how-to-tell-if-a-file-is-git-tracked-by-shell-exit-code
10
11 ### Fix your email address in your commits
12
13 https://help.github.com/articles/changing-author-info
14
15 http://stackoverflow.com/questions/750172/how-do-i-change-the-author-of-a-commit-in-git
16
17 http://git-scm.com/docs/git-rebase#_recovering_from_upstream_rebase
18
19 http://serverfault.com/questions/12373/how-do-i-edit-gits-history-to-correct-an-incorrect-email-address-name
20
21 ### Use git submodules
22
23 Once your submodules are all set...
24
25     git submodule init
26     git submodule update
27
28 http://chrisjean.com/2009/04/20/git-submodules-adding-using-removing-and-updating/
29
30
31 #### Remove a git submodule
32
33 > To remove a submodule you need to:
34
35 > 1. Delete the relevant line from the ''.gitmodules'' file.
36 > 1. Delete the relevant section from ''.git/config''.
37 > 1. Run ''git rm --cached path_to_submodule'' (no trailing slash).
38 > 1. Commit the superproject.
39 > 1. Delete the now untracked submodule files.
40
41 > -- https://git.wiki.kernel.org/index.php/GitSubmoduleTutorial