Szymon Grabia
System that records changes to a set of files over time
Distributed Version Control System
Main features:
shared
repository
developer
developer
developer
shared
repository
developer
developer
developer
Working
directory
Staging area
Repository
Local
Remote
Repository
git add
git commit
git push
git pull
git checkout
git config --global user.name "John Doe"
git config --global user.email "johndoe@example.com"git initgit statusgit add FILEgit commit -m "MESSAGE"git diffExit with "q"
C1
C2
master
C1
C2
master
test
git branch testC1
test
C2
master
git checkout testC1
test
C2
C3
master
C1
test
C2
C3
C4
master
C1
test
C2
C3
C4
C5
master
C1
test
C2
C3
C4
C5
C6
master
C1
master
test
C2
C3
C4
C5
C7
C6
git checkout master
git merge testgit log [--graph]Exit with "q"
git merge test# .gitignore
# ignore all files ending with ".log"
*.log
# BUT don't ignore "important.log"
!important.log
# ignore all directories named "data"
data/
# ignore directories named "data" in the project root
/data/A collection of useful .gitignore templates:
Don't store data in repositories!
git stashgit stash apply
OR
git stash popgit stash listgit stash show -agit tag
git rebase
git rm
git reset
git blame
Working
directory
Staging area
Repository
Local
Remote
Repository
git add
git commit
git push
git pull
git checkout
ssh-keygen -t rsa -b 4096 -C "szymon.grabia@gmail.com"eval "$(ssh-agent -s)"ssh-add ~/.ssh/id_rsacat ~/.ssh/id_rsa.pubgit clone https://github.com/LaVestima/ngseminar-git-github.gitgit remote -vgit push [<repository> [<refspec>...]]git push origin mastergit pull [<repository> [<refspec>...]]git pull origin master