Last active
August 29, 2015 14:26
-
-
Save stalluri/a52f87d0b44b5bd1dca8 to your computer and use it in GitHub Desktop.
Fugitive best commands
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Stage current file to index | |
Gwrite | |
# Read current file from last checkedin version | |
Gread | |
# Move current file and update vim buffer ( with relative paths, if starting with / means relative to git root directory) | |
Gmove | |
# Remove current file and update vim buffer | |
Gremove | |
# Commit with auto completion on open buffers | |
Gcommit | |
# Show git status | |
# - adds or remove files to index using '-' | |
# C opens Gcommit | |
# Enter opens file below | |
Gstatus | |
# To add all files to index | |
Git add . | |
# Diff current working file with last checkedin file (index) | |
Gdiff | |
# Use Gread or Gwrite to stage or checkout | |
Gread/Gwrite | |
# Alternatively stage hunks using, and move using [c or ]c | |
diffput or diffget | |
# Resolve merge conflict using a three way merge | |
# current working copy always in the middle window | |
# Target(HEAD) //2 , Working copy.js, Merge //3 | |
# Write current active window into index and working copy using | |
Gwrite or Gwrite! will write from act | |
# Write hunks using | |
diffput or diffget //1 or //2 | |
# Close all diff windows except active window | |
:only |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment