- ssh-keygen -t ed25519 -C "[email protected]"
- ssh-add ~/.ssh/id_ed25519
- vim ~/.ssh/id_ed25519.pub and paste it in github page settings
- eval
ssh-agent -s
- ssh-add ~/.ssh/id_rsa_key
- To reference a commit in a issues comment, simply write its SHA-hash, and it'll automatically get turned into a link
- Want to save an empty directory? use the
.gitkeep
file trick! - link/anchor to chapther/heading example
git config --global credential.helper 'cache --timeout=99999999'
Solution: just click on the Github's alert for information, usually you just need to update dependencies.
While switching profile's picture.
Solution: switched browser and it worked.
Example: remove README.md
from history and everywhere:
git filter-branch --force --index-filter \
'git rm --cached --ignore-unmatch README.md' \
--prune-empty --tag-name-filter cat -- --all
and
git push --all --force
Updated version 2022, removing __pycache__
folder
git filter-branch --force --index-filter 'git rm --cached --ignore-unmatch __pycache__' --prune-empty --tag-name-filter cat -- --all
git push --all --force
git checkout --orphan tmp-master # create a temporary branch
git add -A # Add all files and commit them
git commit -m 'Add files'
git branch -D master # Deletes the master branch
git branch -m master # Rename the current branch to master
git push -f origin master # Force push master branch to Git server
git config --global user.email "[email protected]"
Check it:
git config user.email