Git skills

Free Git Configuration Tricks

> git pull
> git checkout -b [feature]
... do the work, using:
> git add [file]
> git commit -m [message]
... deliver with something like:
> git merge master
> git checkout master
> git merge [feature]
> git push

A Nice git log

git config --global alias.sl "log --graph --pretty=oneline --abbrev-commit"

Rebase Instead of Merge

Merging (left) vs. rebasing (right)

On Pull

git config --global pull.rebase true

In General

git config --global alias.me "merge --ff-only"

Better Push

git config --global alias.pu "push --force-with-lease"

Add With Tweezers

git config --global alias.ad "add -p"

Check The Mirror Before You Go Out

Summary

> git pull
> git checkout -b [feature]
... do the work, using:
> git ad [file]
> git commit -m [message]
... deliver with something like:
> git rebase -i master
> git checkout master
> git me [feature]
> git pu

I live by my mentors words: “The key to being consistently brilliant is: hard work, every day.”

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store