Skip to content
This repository has been archived by the owner on Apr 14, 2024. It is now read-only.

LeKiosqueFr/git-tips

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

git-tips

logo

Some quick git tips: Slides Here

Branched from the wrong branch?

git rebase —onto foo bar 

onto

Forgot to add something to a commit?

git commit —amend -c foobar

ammend

Want to switch back to the previous branch?

git checkout -

checkout

Want to stage some changes?

git add -p

add

Want to set upstream?

git push -u origin foobar

push

Want to push nothing?

git commit —allow-empty -m "foobar"

empty

Want to find out which branch has a commit?

git branch --contains foobar

contains

Want to speed things up?

git gc

gc

Want to undo bad things?

git reflog

reflog

Want to find out when things broke?

git bisect start foo bar

bisect

Want to squash/delete commits?

git rebase -i foobar

rebase

Want to always pull with rebase?

git config --global branch.autosetuprebase always

Want git to be case sensative?

git config --global core.ignorecase false 

Love typos?

git config --global help.autocorrect 1

Like color?

git config —global color.ui 1

Same conflicts?

git config --global rerere.enabled true

Releases

No releases published

Packages

No packages published