Git Integration With Sublime Text

There is nothing good than keeping your work on Github, it is easy to share, store and collaborate with team. This post is about setting sublime text 3 as your default git editor.

  • Download and Install Git from their official site.
  • Open Sublime text and Press Ctrl+Shift+P┬áit opens package control window.
  • Select Package Control: Install Package
  • Next window Select Git

Now we have added Git package and also Installed Git, now clone your git repository as like blow.

go get github.com/umeshrakhe/DwEtlGo

From File menu select Open Folder and browse to your $GOTPATH directory and ten recently git clone project like $GOPATH/go/src/umeshrakhe/DwEtlGo

Now add new File to this directory and then follow below step to commit these change back to repository.

  • create hello.go file and some code.
  • click on Tools–>Git–>This File–>Add.
  • Click on Tools–>Git–>This File–>Commit.
  • in Git output window you will see message stating “Aborted commit without message”

To solve this issue execute below command.

git config --global core.editor "\"c:\Program Files\Sublime Text 3\subl.exe\" -w -n"

Note: change the path according to sublime instillation path.

Now when you do commit again it will ask you message, write appropriate message and hit enter. Your commit completed, to reflect on repository you have to push the changes, using same method we followed for Add.

Refresh your repository (if we it is github) and you can see the changes made from Sublime Text.

Here we have completed Git with Sublime Integration successfully.

 

 

 

About dwetl

Leave a Reply

Your email address will not be published. Required fields are marked *