Tag: git

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 […]

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 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 […]