Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Git Basics

Sponsored · Your Podcast. Everywhere. Effortlessly. Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
Avatar for Awin Abi Awin Abi
February 25, 2015
93

Git Basics

Avatar for Awin Abi

Awin Abi

February 25, 2015
Tweet

Transcript

  1. Setup & Config  Create a public repo in Github

     Install git in local apt-get install git  ssh setup https://help.github.com/articles/generating-ssh-ke ys/  Add global config for git in local git config --global user.name "Awin Abi" git config --global user.email [email protected]
  2. Daily Git  Clone git clone <repo>  Add changes

    git add <file>  Status git status  Commit git commit  Log git log  Push git push origin master  Pull git pull origin master
  3. Branching & Merging  A branch is a movable pointer

    to one of these commits  New Branch git checkout -b <branchname>  Switch Branch git checkout <branchname>  Merge git checkout master git merge <branch>
  4. Pull Request  Create a new branch from master for

    a new ticket '33452/fix-approver-view'  Make changes and commit  Push the new branch to github  Create pull request  Comment / Review  Merge Pull Request https://guides.github.com/introduction/flow/
  5. Git Session II  Simple merge  Merge with conflicts

     Rebase  Meld and Netbeans Git
  6. Notes  Download Git plugin for Netbeans 6.9:: https://code.google.com/p/nbgit/downloads/detail?name=nbgit-0.4- netbeans-6.9.nbm&can=2&q=0.4

     Install meld tool:: sudo apt-get install meld  Configure meld as diff and merge tool:: git config --global diff.external meld git config --global merge.tool meld