Notes about Git: Difference between revisions

From OpenPetra Wiki
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
== Developing with Git as non core developer ==
Only the core developers have write access to the Git repository of OpenPetra at Sourceforge. For all other developers, it will be necessary to check out the Git repository anonymously, and then create a branch for yourself. Then you can use the Patch functionality to create patches and send them to the OpenPetra.org project. Please use the [http://apps.sourceforge.net/phpbb/openpetraorg/viewforum.php?f=12 forum for submitting patches].

Revision as of 13:13, 2 Haziran 2009

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