Aug 26, 2010

More on GIT

Do some changers to the files and add them to the index.
$git add file1 file2 file3 - will do it.

Then $git diff --catched
You may see what is about to be commited by using this.

$git commit -this will commit the progect and it will record the new version.

View the history;
$git log - can get the history of changers
$git log -p gives the changers with diffs at each poit.

Manage branchers;
$git branch "name" - this will create a new branch with a nane.
$git branch - this will give a list of branchers.

BY using;
$git checout "name"- you can change the branch, edit, commit and switch back to the master branch.
(edit files)
$git commit -a
$git checkout master
Then make changers in master branch;
(edit files)
$git commit -a

Now you can merg them together by;
$git merg "name"
If there is no conflict you are done.If there are, it will be left in problematic files showing the conflicts.
$git branch -d "name" will ensure that the changers in the "name" branch are already in the current branch.

No comments:

Post a Comment

Your comments are always welcome ...