This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
project_management:git [2010/07/05 17:48] 172.26.14.218 |
project_management:git [2020/01/30 12:53] aorth removed |
||
---|---|---|---|
Line 85: | Line 85: | ||
To edit a commit (like fixing a spelling or logic mistake): | To edit a commit (like fixing a spelling or logic mistake): | ||
- Look at '' | - Look at '' | ||
- | - Start the interactive rebase process, pasting in the characters from the ID: '' | + | - Start the interactive rebase process, pasting in the characters from the ID: git rebase --interactive ID |
- Your editor will come up with several lines like '' | - Your editor will come up with several lines like '' | ||
- Change the word " | - Change the word " | ||
- Save and quit. | - Save and quit. | ||
- | - Edit your project files to make the correction, then run '' | + | - Edit your project files to make the correction, then run git commit --all --amend |
- | - After you’ve committed the fixed version, do '' | + | - After you’ve committed the fixed version, do git rebase --continue |
+ | ===== Change the last commit' | ||
+ | Sometimes you commit something without realizing you haven' | ||
+ | < | ||
+ | commit 85f761ec52e4be90acd2dc7c9f5842e36ad7d783 | ||
+ | Author: Alan Orth < | ||
+ | Date: Sun Nov 21 05:07:48 2010 -0500 | ||
+ | |||
+ | Initial Import of DSpace 1.6.2 | ||
+ | $ git commit --amend --author 'Alan Orth < | ||
+ | ... vim/nano will pop up, save the commit | ||
+ | $ git log -n1 | ||
+ | commit 85f761ec52e4be90acd2dc7c9f5842e36ad7d783 | ||
+ | Author: Alan Orth < | ||
+ | Date: Sun Nov 21 05:07:48 2010 -0500 | ||
+ | |||
+ | Initial Import of DSpace 1.6.2</ | ||
===== Assume file unchanged ===== | ===== Assume file unchanged ===== | ||
Certain files, like database configuration files, need to be tracked but you don't want to push changes to the remote repo. This is different than using a '' | Certain files, like database configuration files, need to be tracked but you don't want to push changes to the remote repo. This is different than using a '' | ||
Line 127: | Line 143: | ||
changed = green | changed = green | ||
untracked = cyan</ | untracked = cyan</ | ||
+ | | ||
+ | ==== Check the current git configurations ==== | ||
+ | < |