Some useful Git command

If you want to change default git’s editor.

git config --global core.editor "vim"

Change email and name

git config --global user.name "name"
git config --global user.email "email"

Let say you did some change in master branches and you want to move this change to another branch. It can happen at least it happened to me. Here is the solution
Create a branch any name. example test
git stash
git checkout test
git stash apply

It has been taken from here

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s