|
Sep
24
|
GIT
What is Git?
Git is a free & open source, distributed version control system designed to handle everything from small to very large projects with speed and efficiency. Git was initially designed and developed by Linus Torvalds for Linux kernel development.
To install Git on Debian/Ubuntu based Linux distribution use
apt-get install git-core
Run once to create your local work branch
git checkout -b
Then make changes and commit to local branch.
Commit good practices:
- If you commit with git-gui, please inspect diff of every file included in the commit. You should not modify or delete any files that are not part of logic changes related to a task.
If you do not have a gui program to commit, inspect diff from command line: git-status – check files that need to be added/removed and git-diff to inspect changed files. - Enter a good description for commit: first line should be a summary up to 80 chars, other lines can contain more descriptive message, if commit is related to a ticket use re #ticket_number to automatically add a comment to the ticket with commit description.
To push to repository:
rake git:push
this command will update code from remote repository and will rebase your work branch with master, merge master branch and it will push your changes to remote server.
To update the code from central repository
rake git:update
git checkout master
git checkout -b
commit your changes and after push this branch to remote
git push origin
- You want to copy one commit from other branch to current branch
git checkout current_branch
git cherry-pick sha_id_from_other_branchUsing gitk:
- right click on current branch and click check out this branch from popup menu
- click on commit from other branch, right-click and select Cherry-pick this commit
- You forget to add some files to previous commit:
git reset --soft HEAD^
# do some changes, add files that you forget
git commit -c ORIG_HEADUsing git-gui:
- Click Amend radio button above text area for commit description
- Add/remove files from commit
- Commit new changes
You can find more information regarding the Git here.
You can also find some useful miscellaneous git tools here
February 25th, 2010 at 11:26 pm
py3aCi mrirgtodayve, [url=http://mkovcfuxcizk.com/]mkovcfuxcizk[/url], [link=http://ffonszxgldua.com/]ffonszxgldua[/link], http://drjebagkjgqs.com/
March 17th, 2010 at 7:46 pm
ZktigJ vzjutzmpeqpg, [url=http://tcrwktqawnbo.com/]tcrwktqawnbo[/url], [link=http://kkyjmzfwupgk.com/]kkyjmzfwupgk[/link], http://sajhyifiourh.com/
June 9th, 2010 at 11:29 am
Hello, I enjoy your blog. This is a good site and I wanted to post a comment to let you know, good job! Thanks Meme
Louis Vuitton
louis vuitton