In the standard git gui, there are options to stage selected lines or stage hunk. I find myself using these options constantly, but each time I have to right click, which can be tricky on a touchy work laptop trackpad. Is there a keyboard shortcut for the 'stage selected lines' functionality?
Working with GUIStep 1: Download and install the latest version of Git for Windows. Step 2: Use the default options for each step in the installation. Step 3: Remove Git Bash Desktop Icon. Step 4: Go to Start > All Programs > Git > Git GUI and make a Desktop Shortcut.
GIT GUI Change Origin of Remote Repository – Solution:In your GIT GUI Remote Menu, choose Remove Remote > and select your 'origin' (it can be anything you named it earlier). Now you have no remote source origin link. You cannot fetch or push anywhere. Go ahead and add in your new remote origin.
Basically all you need to do is type 'open . ' to open the current directory in Finder and then click the Git button to open up git gui.
Here is a solution:
Open this file:
c:/Program Files (x86)/Git/libexec/git-core/git-gui.tcl
Add the following:
bind . <$M1B-Key-d> stagelines
proc stagelines {} {
apply_or_revert_range_or_line %X %Y 0
# for older versions of git-gui, use this line instead:
#apply_range_or_line %X %Y
do_rescan
}
Restart git-gui
Now you can highlight the lines and hit CTRL-D to stage them.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With