https://github.com/thetechnocrat-dev/github-commands
useful github or git commands that are not common enough to memorize
https://github.com/thetechnocrat-dev/github-commands
Last synced: about 2 months ago
JSON representation
useful github or git commands that are not common enough to memorize
- Host: GitHub
- URL: https://github.com/thetechnocrat-dev/github-commands
- Owner: thetechnocrat-dev
- Created: 2016-02-07T20:02:47.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-06-03T23:25:37.000Z (about 9 years ago)
- Last Synced: 2025-02-15T07:31:13.787Z (4 months ago)
- Size: 1.95 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# github-commands
useful github or git commands that are not common enough to memorize* Update git authorship (only use on repositories with no other users!, useful if work computer puts incorrect author on commits)
git filter-branch -f --env-filter "GIT_AUTHOR_NAME='mcmenemy'; GIT_AUTHOR_EMAIL='[email protected]'; GIT_COMMITTER_NAME='mcmenemy'; GIT_COMMITTER_EMAIL='[email protected]';" HEAD
* Push a remote which is not upstream of current branch
git push --set-upstream master
* Remove a file from git repository but not local (like if you accidently pushed node modules)
git rm -r --cached node_modules
git commit -m 'remove the now ignored directory node_modules' (make sure you added folder to .gitignore)
git push