GIT INTRODUCTION Abhishek Dey Das abhis ws Sudhanshu
GIT INTRODUCTION Abhishek Dey Das abhis. ws | | Sudhanshu Iyer siyer. info
1 Git Basics q What is Git ? • Type of Source Control Mangement System (SCM) • … q Where does Git fit in ? • Used to manage versions of your code.
Architecture of Git
1. 1 Getting a Git Repository • Create a repository on Git. Hub • Add your team members. • Don’t forget to add us adeydas roboguy – Abhishek – Sudhanshu
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 Git. Hub.
1. 2 Recording Changes to the Repository • Initialize Git in your project folder $ git init • Add the remote repostiory $ git remote add origin “URL_Goes_Here” • Add/Modify files • Check Git Status of your project $ git status • Add a Read. Me and. gitignore • Add files for commit to local repository $ git add <filename> …
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
2 Git Branching
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
Commands Summary • Asdsad
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.
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 !
Some Useful resources… • Git SCM Book: http: //git-scm. com/book • Git. Hub Help: help. github. com
- Slides: 13