GIT references for commands - vishwanathj/technical GitHub Wiki

Deleting a branch --> https://www.git-tower.com/learn/git/faq/delete-remote-branch

Keeping a fork updated -->

https://blog.scottlowe.org/2015/01/27/using-fork-branch-git-workflow/ [I refer this often]

Delete a commit --> https://ncona.com/2011/07/how-to-delete-a-commit-in-git-local-and-remote/

https://stackoverflow.com/questions/1628088/reset-local-repository-branch-to-be-just-like-remote-repository-head

http://www.siteground.com/tutorials/git/commands.htm

http://gitreal.codeschool.com/?utm_source=github&utm_medium=codeschool_option&utm_campaign=trygit

https://github.com/tiimgreen/github-cheat-sheet

Reversing a patch ==> https://www.drupal.org/patch/reverse ==> git apply -R path/file.patch

Creating a release --> https://help.github.com/en/articles/creating-releases

Different merges ---> https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/about-pull-request-merges

Amend a commit -->

Rebase branches:

Rebase Pull Request:

Remove merges from a Pull Request and squash commits:

Squash Commits-->

e.g;

git rebase -i origin/master~4 master

git push origin +master

Signing Commits -->

How to fix git always asking for user credentials

Forcing a CI recheck hack -->

  • git commit --amend followed by :wq! without making any changes; next, issue for e.g; git push --force origin branchname
  • git commit -s --amend --no-edit followed by git push --force origin branchname

Undoing, fixing, or removing commits in git

Git Interactive learning

Create a branch from another user's pull request

2FA Authentication in Github and using https

Visit the Settings -> Developer Settings -> Personal Access Tokens page in GitHub (https://github.com/settings/tokens/new), and generate a new Token with all Repo permissions: