Notes about Git: Difference between revisions
Jump to navigation
Jump to search
Line 13: | Line 13: | ||
* undo all local changes: <code>git checkout -f</code> | * undo all local changes: <code>git checkout -f</code> | ||
* to ignore eg. *.bak files, create a file .gitignore and add the files; eg see OpenPetra/csharp/.gitignore | * to ignore eg. *.bak files, create a file .gitignore and add the files; eg see OpenPetra/csharp/.gitignore | ||
Revision as of 13:13, 2 Haziran 2009
- Crash Course: http://git.or.cz/course/svn.html
- User Manual for Git: http://www.kernel.org/pub/software/scm/git/docs/user-manual.html
TortoiseGit
This works fine on Windows, although it is still work in progress...
Git Bash
- You need to add each changed file before you commit. Otherwise that file will not be part of the next commit.
- If you added too many files by accident, and you want to lose them completely: (use this carefully with -f) git rm . -r
- even better: to unstage: git reset HEAD <file>...
- undo all local changes:
git checkout -f
- to ignore eg. *.bak files, create a file .gitignore and add the files; eg see OpenPetra/csharp/.gitignore