https://github.com/git/git/tree/e83c5163316f89bfbde7d9ab23ca2e25604af290?s=09

“git” can mean anything, depending on your mood.

configuration

Asking user and password every time: Make sure you are using ssh instead of HTTP protocol. See which one you are using with

git config -l

And if you need to update it, do it like this:

git config remote.origin.url git@github.com:alanboy/project.git

submodules

Git submodules

git submodule update --init --recursive

squash

https://stackoverflow.com/questions/25356810/git-how-to-squash-all-commits-on-branch/25357146#25357146

 git checkout yourBranch
 git reset $(git merge-base master yourBranch)
 git add -A
 git commit -m "one commit on yourBranch"

reset

Git reset will move the HEAD and/or the branch pointer.

git reset --soft HEAD~5

Reset local repository branch to be just like remote repository HEAD

git fetch origin
git reset --hard origin/master

Note: HEAD~ means HEAD minus 1 commits, HEAD~3 means HEAD minus 3 commits.

git merge –squash users/alango/authz

Github and credentials

Install gh:

curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo gpg --dearmor -o /usr/share/keyrings/githubcli-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null
sudo apt update
sudo apt install gh

Then you can login using a PAT:

gh auth login

https://github.com/cli/cli/blob/trunk/docs/install_linux.md https://docs.github.com/en/get-started/getting-started-with-git/caching-your-github-credentials-in-git

Internals

https://yurichev.com/news/20201220_git/

References

https://stackoverflow.com/questions/1628088/reset-local-repository-branch-to-be-just-like-remote-repository-head http://fabiensanglard.net/git_code_review/diff.php https://github.com/HerCerM/ManualDefinitivoGit/blob/master/Parte2_Profundizando.md https://pre-commit.com/ https://www.youtube.com/watch?v=Flho9VgaZ_g&ab_channel=javaM%C3%A9xico