GIT

INSTALLING GIT

UBUNTU (DEBIAN)


 sudo apt-get install git

configuration

 git config --global user.name "Your Name" git config --global user.email "user_email@email.com"

SSH

 ssh-keygen -t rsa -C "user_email@mail.com" 

Getting started


  • Make a directory for your project.
  • Enter your project directory


 git init git remote add origin "repo_url"
<keep coding>
git add file.ex git commit "An example of commit" git push origin master

what about an existing repo?


git clone "repo_url" git fetch origin master git merge origin/master

BRANCHES!

 git branch testing git checkout testing<make changes> git checkout master git merge testing

you can change history!!


 git rebase -i 4hf54e

RESET

Unstage a changed file.
Undo commits( optional  ).

THANK YOU!

GIT

By aarti

GIT

  • 322