Git save local changes without commit

Often, when you’ve been working on part of your project, things are in a messy state and you want to switch branches for a bit to work on something else. The problem is, you don’t want to do a commit of half-done work just so you can get back to this point later. The answer to this issue is the git stash command. Stashing takes the dirty state of your working directory – that is, your modified tracked files and staged changes – and saves it on a stack of unfinished changes that you can reapply at any time.

Using different git accounts in your computer

I am using 2 different GitHub accounts on my computer. I checked out using my account A first and Windows asked my for storing the credential and I accepted. But when I try to push to my account B repository, git always use my account A to push and error return Option 1: Try to check out B’s repo again with B account in the url then try to push

Git clone using SSH

Today I try to clone my GitHub repository through SSH instead of https as usual. Create an pair of SSH key using Puttygen and put to ~.ssh\ folder (Windows C:\User~.ssh) id_rsa id_rsa.pub Copy the content of pub file to create a new Deploy key in Repository Settings. <img class="alignnone size-full wp-image-42" src="http://itungnt.com/wp-content/uploads/2016/01/githubssh.jpg" alt="githubssh" width="1061" height="633" /> Choose Allow write access if you want to allow push Now you can do Git clone through SSH git clone git@github.

How to change the source version control from SVN to Git

Today I created the Git repository from our SVN repository. Not too hard but need some techniques. Check out from SVN and push to GIT From your workspace clone the svn trunk using git svn clone git svn clone YourSvnTrunkUrl Add remote git repository for pushing git remote add origin YourGitRepoUrl Push the master (trunk) to remote server git push -u origin master To clone 1 branch from svn.