git-workshop
basic intro to git
Curriculum
Basic (Individual)
- Configure git
configure the user which will be used by git
Of course you should use your name
git config --global user.name "Example Surname"
Same for the email address
git config --global user.email "your.email@gmail.com"
2. git clone [url]
3. git status
4. git add <filname>
or git add .
5. git commit -m <message>
and git commit -am <modified message>
6. git push
7. git pull
vs git fetch
8. git log --filname
9. .gitignore
Advanced ( In a team)
- create a new branch
git branch <branch-name>
list all branchesgit branch
switch to existing branchgit checkout <branch-name>
create a branch and switch to itgit checkout -b <branch-name>
- Merge two branches
git merge <source>
:(SOURCE to target) (make sure to be on target) - Remote