GIT
completely remove .env secret
Fix author on previous commits
- [link](https://waylonwalker.com/fix-git-commit-author/#:~:text=Fix git commit author 1 Change the email,... 8 A note on changing history... )
- git - How to change the commit author for a single commit? - Stack Overflow
usual grind
Git add .
Git commit -m 'message'
Git push
list branch and switch to
Git branch
Git checkout <branchname>
Git init
.gitignore
remove / clean files & directories from remote repo after .gitignore update
git rm -r --cached .
git add .
git commit -m 'Remove newly ignored directory and files'
git push origin master
change branch
git checkout -b <branchname>
--> create new and change togit checkout <branchname>
--> change to existing
remove unwanted add
git restore --staged <filename>
stash
git stash
git stash pop
link repo with existing local files
cd public
git init
git add .
git remote add origin https://github.com/<username>/<repo>.git
git commit -m 'first commit'
git push origin master
git repo inside a git repo?
git submodule add <url> <directory>
git submodule add https://github.com/wchorski/myrepo ./directory
fix commit author
global login via terminal
- login to github from terminal Code Example (iqcode.com)
- How to Set Git Username and Password in GitBash? - GeeksforGeeks
- link
git config --global user.name "John Doe"
git config --global user.email johndoe@example.com
git config --global user.password "1234321"
git config --global credential.helper store
or before you push a commit try this out instead
git config credential.helper store
git push http://example.com/repo.git
Username: <type your username>
Password: <type your password>
# several days later
$ git push http://example.com/repo.git
# your credentials are used automatically
'fatal: unable to write new index file'
chmod -RN /path/to/repo