How to Pick a Commit of Git Submodule?

Current State There is a new submodule ‘test’ and we want to add it to the repo. Steps Git add submodule $ cd my_repo $ git submodule add git@github.com:vishalkanaujia/dev-tools.git Initialize the repo $ git submodule update –init –recursive cd to the submodule $ cd dev-tools By default, the latest version is picked. We can checkout … More How to Pick a Commit of Git Submodule?

How to use Gist with Stackedit for WordPress blog?

How to use Gist with Stackedit for WordPress blog? Create the gist and copy the git number An example is https://gist.github.com/vishalkanaujia/c7d692de9a3b337e9ad8e655533b9856 The gist id is the last string of the address: “c7d692de9a3b337e9ad8e655533b9856” In the stackedit source (markdown file), add the following code: [g i s t]c7d692de9a3b337e9ad8e655533b9856[/g i s t] Please type as “gist” WordPress will … More How to use Gist with Stackedit for WordPress blog?

Git Cheat Sheet

Describe a change number $ git show dc54076 Reset the current branch with HEAD of master $ git fetch origin $ git reset –hard origin/master Keep your branch in sync with origina master branch $ git pull origin master Arrange all changes in order. Fixes the log too. $ git rebase origin wip_my_work Squash commits … More Git Cheat Sheet

git push error “remote: Invalid username or password. fatal: Authentication failed”

I have 2-factor authentication enabled on my account. The repo is my own and I was unable to push changes to a private branch. Steps to resolve 1. Check your remote of repo $ git remote -v origin https://github.com/vishalkanaujia/gnome-connection-manager-1.git (fetch) origin https://github.com/vishalkanaujia/gnome-connection-manager-1.git (push) Looked carefully, I was trying to push using https. 2. I updated local … More git push error “remote: Invalid username or password. fatal: Authentication failed”