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 init
git status
git add FILE
git commit -m "MESSAGE"
git diff
Exit with "q"
C1
C2
master
C1
C2
master
test
git branch test
C1
test
C2
master
git checkout test
C1
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 test
git 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 stash
git stash apply
OR
git stash pop
git stash list
git stash show -a
git 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_rsa
cat ~/.ssh/id_rsa.pub
git clone https://github.com/LaVestima/ngseminar-git-github.git
git remote -v
git push [<repository> [<refspec>...]]
git push origin master
git pull [<repository> [<refspec>...]]
git pull origin master