Difference between revisions of "Git"

From PaparazziUAV
Jump to: navigation, search
(Git moved to Git-svn: making a new page regarding git only, this one is about using git against the svn repo)
 
(start of git page)
Line 1: Line 1:
#REDIRECT [[Git-svn]]
+
How to use [http://git-scm.com/ git] to commit to the paparazzi git repository.
 +
 
 +
See [https://git.wiki.kernel.org/index.php/GitSvnCrashCourse Git - crash course] for an introduction into git for svn users. For git newbies the [https://git.wiki.kernel.org/index.php/GitCheatSheet Git CheatSheet] is also nice.
 +
 
 +
To get an understanding off the git internals the [http://blip.tv/file/4094854 video Getting Git] is excellent.
 +
 
 +
== Git help and resources ==
 +
There are tons of tutorials, etc. out there...
 +
You can also get help on any Git command by doing '''<code>git ''command'' -h</code>''' or '''<code>git help ''command''</code>'''.
 +
 
 +
See [https://git.wiki.kernel.org/index.php/GitSvnCrashCourse Git - crash course] for an introduction into git for svn users. For git newbies the [https://git.wiki.kernel.org/index.php/GitCheatSheet Git CheatSheet] is also nice.
 +
 
 +
To get an understanding off the git internals the [http://blip.tv/file/4094854 video Getting Git] is excellent.
 +
 
 +
More:
 +
* [http://book.git-scm.com/index.html git communitiy book]
 +
* [http://progit.org/book/ ProGit book]
 +
* [http://gitready.com/ git ready - short tips]
 +
* [http://gitref.org/ nice Git reference]
 +
 
 +
== Before You Start ==
 +
 
 +
Git is not an evolution of SVN (like SVN is from CVS). This mayo lead to a lot of extra headscratching among migraters.  You have been warned.
 +
 
 +
=== Configuring Git ===
 +
 
 +
First tell git your ''real name'' and your ''e-mail address''.  You should add these before you start using Git:
 +
 
 +
git config --global user.name ''"Your Name"''
 +
git config --global user.email ''you@yourdomain.example.com''
 +
 
 +
You also might want to set some color options and aliases, e.g.:
 +
 
 +
git config --global color.ui auto    # colors for all
 +
git config --global alias.st status  # make `git st` work
 +
git config --global alias.co checkout # make `git co` work
 +
git config --global alias.ci commit  # make `git ci` work
 +
git config --global alias.br branch  # make `git br` work
 +
 
 +
If you want to inspect your configuration work have a look at your '''.git/config''' file.
 +
 
 +
=== Set up a Github account ===
 +
If you want some [http://github.com/ github] awesomeness you have to set up an account there and set your github token.
 +
 
 +
== Get the code ==
 +
=== Clone from Github ===
 +
 
 +
git clone git://github.com/paparazzi/paparazzi3.git
 +
 
 +
To get the changes from the master branch on github run
 +
git pull
 +
 
 +
 
 +
Gitk is your friend if you want to visualize all branches and history:
 +
gitk --all

Revision as of 11:29, 21 October 2010

How to use git to commit to the paparazzi git repository.

See Git - crash course for an introduction into git for svn users. For git newbies the Git CheatSheet is also nice.

To get an understanding off the git internals the video Getting Git is excellent.

Git help and resources

There are tons of tutorials, etc. out there... You can also get help on any Git command by doing git command -h or git help command.

See Git - crash course for an introduction into git for svn users. For git newbies the Git CheatSheet is also nice.

To get an understanding off the git internals the video Getting Git is excellent.

More:

Before You Start

Git is not an evolution of SVN (like SVN is from CVS). This mayo lead to a lot of extra headscratching among migraters. You have been warned.

Configuring Git

First tell git your real name and your e-mail address. You should add these before you start using Git:

git config --global user.name "Your Name"
git config --global user.email you@yourdomain.example.com

You also might want to set some color options and aliases, e.g.:

git config --global color.ui auto     # colors for all
git config --global alias.st status   # make `git st` work
git config --global alias.co checkout # make `git co` work
git config --global alias.ci commit   # make `git ci` work
git config --global alias.br branch   # make `git br` work

If you want to inspect your configuration work have a look at your .git/config file.

Set up a Github account

If you want some github awesomeness you have to set up an account there and set your github token.

Get the code

Clone from Github

git clone git://github.com/paparazzi/paparazzi3.git

To get the changes from the master branch on github run

git pull


Gitk is your friend if you want to visualize all branches and history:

gitk --all