Git
Contents
Handy Tricks for Git
Global Ignore Settings
This is primarily to avoid accidential upload of keys/config/etc to a git host, ie github.
|
Then populate it with the below plus anything that you might want:
|
Status & Changes
View current changes
|
Undo changes on a particular file, aka rollback to previous commit.
|
Blow away all current changes
|
Branches
See local branchs
|
List all branchs
|
Switch branch
|
Create a new branch, switch to it & push it to remote
|
Deleting A Commit
In the instance a commit is must be deleted, as opposed to reverting, etc.
|
Setting SSH Config
For instances with multiple SSH configs available.
- Get github SSH config name
|
- Add remote URL with the desired config name:
|
- Add ssh passphrase to keychain
ssh-add -K ~/.ssh/id_rsa