Installation
The installation with fedora:
Setup
My favorite setup is basically the default. With added colors and of course setting the email and name:
$ git config --global user.name "John Doe"
$ git config --global user.email johndoe@example.com
$ git config --global color.ui true
Basic Git workflow
Checking out in git
is rather cloning the whole repository:
Once checked out the following three actions are most important:
- modify files
- commit files
- push to server
Modifying the files in the repository until some atomic commit is ready. Once a commit is ready, the next commit is prepared. This is a little different from other version control systems but it is very effective. To create a commit the changes that should be in that commit have to be added to the so called staging area. This is done by:
# to add a file as a whole
$ git add filename
# to get an interactive change adding mode that
# iterates though the changes made
$ git add --patch
Once the changes that will be in the next commit are staged recheck this with:
Committing the changes is then done with:
Write a meaningful commit message into the repository so that everybody understands what you changed. Then save and quit the editor.
The next step pushes the locally committed changes to the remote server do so by:
If the server complains that you do not have the most recent version, then update your local git repository. It is wise to always update right before one starts to work on the repositories to avoid unnecessary conflicts. Do so with:
Git-SVN workflow
Unfortunately svn
is still widely used but with git-svn
a lot of its trouble can be eased. There are some of the most important commands:
Comments
Add a new comment
Note that all comments are moderated - so your post will not appear till I find time to accept it.
The comments do use markup syntax.