GIT
Manually Run Git Hooks
Sometimes you want to manually run a Git hook, like a pre-commit hook, for testing. This can be done from the shell. Navigate to the directory containing your Git repository cd /path/to/code Example directory: |- .git |— hooks |—– pre-commit |- src |— file.js |- READEME.md …
Renaming a Local and …
Sometimes you need to rename a Git branch, here are the simple commands rename a local or remote branch in Git using the command line. Updating Local Branch Switch to the local branch you want to rename git checkout <old branch name> Rename the branch by using the -m flag: git branch -m …
Git Submodules: Error …
If you’ve received the error “The following untracked working tree files would be overwritten by checkout” you are likely using git submodules. Git Submodules are a tool that allows you to pull in a separate working tree, often another repository, into an existing repository. …