git
- How to set GitHub Actions secrets
To add GitHub Actions secrets for a repository, got to its Settings page, then select the Secrets tab, then click on the Add a new secret text button.
- Git: Deleting branches
Local git branches can be deleted using the git branch command with the -d or -D option. Remote git branches can be deleted using the git push command with the --delete option or :.
- Git: Overwrite with forced pull
There is no single command to do a forced pull from the remote. However, using git fetch --all and git reset --hard origin/<branch>, we can overwrite the changes to the tracked files, effective...
- Git not working after macOS update: invalid active developer path
macOS updates do not update the Xcode Command-line Tools by default. Unless it is updated many command-line tools like git will fail to work. It can be updated using xcode-select --install.
- Git: Undo last commit
The last commit can be undone by a combination of git reset --soft HEAD~1 and git reset HEAD .. A more destructive approach is to use git reset --hard HEAD~1.
- Git: Unadd files
To unadd one or more files from staging use the command git reset HEAD <file1