Brainly git basics workshop
Upcoming SlideShare
Loading in...5
×
 

Brainly git basics workshop

on

  • 174 views

Slides from workshop about git basics

Slides from workshop about git basics

Statistics

Views

Total Views
174
Views on SlideShare
133
Embed Views
41

Actions

Likes
0
Downloads
2
Comments
0

3 Embeds 41

https://twitter.com 38
https://www.linkedin.com 2
http://www.slideee.com 1

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Brainly git basics workshop Brainly git basics workshop Presentation Transcript

    • Git & Github workshop
    • Agenda Git basics - File status lifecycle - Staging and committing - Undoing things Distributed Git & Github I - Basic workflow (fork, commit, pull request) Branching - Creating and switching branches - Merging - Rebasing Distributed Git & Github II - Distributed workflow - Synchronising with upstream and resolving conflicts
    • Git basics $ git init
    • Git basics - file status lifecycle $ git status untracked unmodified modified staged add the file edit the file stage the file remove the file commit
    • Git basics - staging and committing Stage file and track untracked files $ git add <file name | wildcard> Remove and stage file removal $ git rm <file name | wildcard> Commit staged changes $ git commit -m “<message>”
    • Git basics - staging and commiting $ cat .gitignore tmp/ # ignore all files in tmp dir logs/*.log # all files in logs dir with .log *.tmp # all files with .tmp ext
    • Git basics - staging and commiting Show unstaged changes $ git diff Show staged changes $ git diff --cached
    • Git basics - staging and commiting Show all commits with authors, dates and descriptions $ git log Show all commits with complete diff $ git log -p Show all commits with additions/deletions stats $ git log --stat
    • Git basics - undoing things Change last commit $ git commit --amend Unstage changes in given file $ git reset HEAD <file name> Revert unstaged changes in given file $ git checkout -- <file name>
    • Git basics - distributed Git & Github I blessed repository
    • Git basics - distributed Git & Github I blessed repository developer public developer public developer public fork fork fork
    • Git basics - distributed Git & Github I blessed repository developer public developer public developer public developer private developer private developer private clone clone clone commit
    • Git basics - distributed Git & Github I blessed repository developer public developer public developer public developer private developer private developer private push
    • Git basics - distributed Git & Github I blessed repository developer public developer public developer public developer private developer private developer private pull request
    • Git basics - distributed Git & Github I blessed repository developer public developer public developer public developer private developer private developer private review pull request & merge
    • Git basics - distributed Git & Github I $ git clone <url> $ git push <remote> <branch>
    • Git basics - Creating and switching branches Create branch $ git branch <name> Activate branch $ git checkout <name> Remove branch $ git branch -d <name>
    • Git basics - Creating and switching branches Merge changes from branch <branch> to selected branch $ git merge <branch> c0 b1 c1 c2b2 c3 branch commit merge
    • Git basics - Creating and switching branches Rebase changes from branch <branch> to given branch $ git rebase <branch> c0 b1 c1 c2b2 branch commit c0 b1 c1 c2 b2 branch commit c1 c2 rebase