TECH MEETUP - From the groud up with GIT

22

Transcript of TECH MEETUP - From the groud up with GIT

GITBasics

by Matías Herranz

$ whoami

Git

- What is it?

- Architecture overview

- Main differences with SVN

Git Basics - Operations

- Pull

- Push

- Commit

- Fetch

- Merge

- Branch

- Remotes

- Add

- Status

- Show

- Checkout

- Clear

- Reset

Git Basics - Branching

- What is a branch?

- Creating a branch

- Deleting a branch

- Local and remote branch

- Switching branches

- Joining branches

Git Basics - Merge Conflicts

- Conflicts!

- How to detect them?

- $ git diff --name-only --diff-filter=U- $ git config --global alias.conflicts "diff --name-only --diff-filter=U"

Git Basics - Merge Conflicts

- Conflicts!

- Understanding them

<<<<<<<: HEADIndicates the start of the lines that had a merge conflict.The first set of lines are the lines from the file that you were trying to merge the changes into.=======:Indicates the break point used for comparison.Breaks up changes that user has committed (above) to changes coming from merge (below) to visually see the differences.>>>>>>>: Commit Hash - Indicates the end of the lines that had a merge conflict.

Working RIGHT with Git

- Tools used with Git- Common Git practices

- Forks, feature branches- A successful Git branching model- Link

Tips and Best Practices

- Pimp my git!

- ~/.gitconfig- Every new clone will have this tuneups

$ git lg / st / ci / br / conflicts

- Git completion- http://bit.ly/pimp-my-git

Tips and Best Practices

- Next step?

Go here and play!

->> http://try.github.io/

- Git shell for windows: link #1 link #2

Ready for more?

GITThe not-so-basic part

Advanced Git

- Now that we have covered the basics...

Advanced Git - Cherry Pick

● What is it?● How to use it?● Why using it?

Advanced Git - Rebase

● What is it?● How to use?● Why using it?● Special uses

Advanced Git - Tags

● What is it?● How to use it?● Use cases

Advanced Git - Bisect

● What is it?● How to use it?

Advanced Git - Squash

● What is it?● How to use it?● Why using it?

Advanced Git - Stash

● What is it?● Basic operations:

○ Using the stash○ List○ Apply○ Clear○ Pop

Advanced Git - Clean

● What is it?● Usage

○ -n, --dry-run○ -d

santexgroup.com