Permission denied message when you try to upload your new repository to GitHub from a Windows computer
If you work on a Windows computer and create a new GitHub repository, you can copy the code from the GitHub page to set the remote address and push the existing code to the GitHub server. You may get the following error message: $ git push -u origin…
Git configuration
If you use 2-factor authentication in GitHub, generate a 40 character Personal Access Token that you can use as a password to access GitHub repositories. Create a Personal Access Token to use it as password in the Git client Store or update your…
Display the branch structure and other important events in the Git command line interface
To set up the display of the branch structure, tags and pulls in the command line interface first create the following “alias” git config --global alias.lgb "log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)…
Branching and merging in Git
Branching and Merging are very powerful features in Git. There are may branching strategies, my favorite is well explained at http://nvie.com/posts/a-successful-git-branching-model/ Pick any model you like and stick to it for a while to better understand…
Merging in Git with four panels in Windows
Git is a great repository for small and large projects. It is easy to create and merge branches to separate code for the features you work on. To make merging easier you can use a free 4 panel merging tool, Perforce P4Merge. Download Download the…
How to delete a folder from Git, but not from the local disk
I have accidentally included a folder in my Git repository, that I don’t want to include in source control. I wanted to remove it from the Git index, but not from the local hard drive. The solution is the following command git rm -r --cached…