Setting Up Git Configurations
Manually
Set your username:
shgit config --global user.name "kellydc"Set your email:
shgit config --global user.email "kelly.carinola@gmail.com"Set your default text editor:
shgit config --global core.editor "code"Set up aliases (optional):
shgit config --global alias.co checkout git config --global alias.br branch git config --global alias.ci commit git config --global alias.st statusView your configurations:
shgit config --list
Using Dotfiles
Create a
.gitconfigfile in your home directory:shtouch ~/.gitconfigAdd your configurations to the
.gitconfigfile:ini[user] name = Your Name email = your.email@example.com [core] editor = your_editor [alias] co = checkout br = branch ci = commit st = statusLink your dotfiles repository (if you have one):
shln -s /path/to/your/dotfiles/.gitconfig ~/.gitconfigVerify your configurations:
shgit config --listUpdate local before you checkout a branch
shgit fetch origin git checkout docs/InitialCreate a new branch:
shgit checkout -b docs/InitialCommit your changes:
shgit commit -am "Add Git configurations"Push your changes to the remote repository:
shgit push origin docs/InitialCreate a pull request on GitHub:
shgh pr create --base main --head docs/Initial -f -r techmimerMerge the pull request on GitHub:
shgh pr merge docs/InitialDelete the branch locally:
shgit branch -d docs/InitialDelete the branch remotely:
shgit push origin --delete docs/InitialUpdate your local repository:
shgit pull origin mainDelete the branch locally:
shgit branch -d docs/InitialCreate a tag
shgit tag -a v1.0 -m "Initial release"Push the tag
shgit push origin v1.0
By following these steps, you can set up your Git configurations either manually or by using dotfiles.