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_branch

    Using gitk: 

    1. right click on current branch and click check out this branch from popup menu
    2. 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_HEAD

    Using git-gui:

    1. Click Amend radio button above text area for commit description
    2. Add/remove files from commit
    3. Commit new changes

   

You can find more information regarding the Git here.
You can also find some useful miscellaneous git tools here

written by admin \\ tags:


3 Responses to “Git- Fast Version Control System”

  1. 1. qwlqanwlnr Says:

    py3aCi mrirgtodayve, [url=http://mkovcfuxcizk.com/]mkovcfuxcizk[/url], [link=http://ffonszxgldua.com/]ffonszxgldua[/link], http://drjebagkjgqs.com/

  2. 2. bpnjjnwmdrd Says:

    ZktigJ vzjutzmpeqpg, [url=http://tcrwktqawnbo.com/]tcrwktqawnbo[/url], [link=http://kkyjmzfwupgk.com/]kkyjmzfwupgk[/link], http://sajhyifiourh.com/

  3. 3. louis vuitton Says:

    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

Leave a Reply