1 / 13

Git Introduction

Git Introduction. Abhishek Dey Das | Sudhanshu Iyer. abhis.ws. |. siyer.info. 1 Git Basics. What is Git ? Type of Source Control Mangement System (SCM) … Where does Git fit in ? Used to manage versions of your code. Architecture of Git. 1.1 Getting a Git Repository.

zandra
Download Presentation

Git Introduction

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Git Introduction AbhishekDey Das | Sudhanshu Iyer abhis.ws | siyer.info

  2. 1 Git Basics • What is Git ? • Type of Source Control Mangement System (SCM) • … • Where does Git fit in ? • Used to manage versions of your code.

  3. Architecture of Git

  4. 1.1 Getting a GitRepository • Create a repository on GitHub • Add your team members. • Don’t forget to add usadeydas – Abhishekroboguy – Sudhanshu

  5. Generating Your SSH Public Key • $ ssh-keygen –t rsa 2048 • It will ask for path: • id_rsa • It will ask for a passphrase: • Leave it blank • Go to home folder: home/utd/.ssh • Copy the contents of id_rsa.pub and add it to GitHub.

  6. 1.2 Recording Changes to the Repository • Initialize Git in your project folder $ gitinit • Add the remote repostiory $ git remote add origin “URL_Goes_Here” • Add/Modify files • Check Git Status of your project $ git status • Add a ReadMe and .gitignore • Add files for commit to local repository $ git add <filename> …

  7. 1.2 Recording Changes to the Repository • Local Commit $ git commit • Push to remote master $ git push origin master Oops!! Looks like it has failed for most people

  8. 2 GitBranching

  9. 2.1 Creating Your Branch • Create Your own branch $ git checkout –b <branch-name> • Commit to your branch $ git push origin <branch-name> • Pulling from remote $ git pull origin <branch-name> • To clean $ git rebase • To check git logs $ git log

  10. Commands Summary • Asdsad

  11. Project 2 • Fork the repository located here: • Add your team members and us too. • The code has some bugs, each team member must fix the bugs and push it to their own branches. • Project manager shall select the best fix and push it to the team’s trunk. • We will pull one of the teams fixes into the main branch.

  12. Project 3 • Use Acme Corp Project. • The goal is to have the entire application in the trunk using git. Small change… You need to add a module that computes square root of a number !

  13. Some Useful resources… • Git SCM Book: http://git-scm.com/book • GitHub Help: help.github.com

More Related