/ notes
GIT
Misc
Reset commit author and author date:
git commit --amend --no-edit --reset-author
Set author and commit date:
set GIT_COMMITTER_DATE="2024-03-23 10:10:00"
git commit --amend --no-edit --date "2024-03-23 10:00:00"
Line ending
git config --global core.autocrlf true
Username (and password) in the URL
** Security risks and concerns, here! Be careful! **
You can specify username and password in the GIT https url. If you clone that way, the url with username and password will be stored in the .git/config file. Be careful!
The following examples use an Azure DevOps Personal Acces Token (PAT). In such a case, username is useless. Only PAT ‘abc…xyz’ is relevant for authentication.
git pull https://fake:abc...xyz@XXXXXX.visualstudio.com/DefaultCollection/XXXXX/_git/XXXXX
git push https://fake:abc...xyz@XXXXXX.visualstudio.com/DefaultCollection/XXXXX/_git/XXXXX HEAD
git pull https://fake:abc...xyz@XXXXXX.visualstudio.com/DefaultCollection/XXXXX/_git/XXXXX HEAD