This tutorial is about configure the git environment.
The related files are downloaded from the Udacity Course How to Use Git and GitHub.
The three necessray files are in the onlines repository: git-completion.bash
, git-prompt.sh
, and bash_profile_course
.
- If you already have a file in your home directory named
.bash_profile
in mac or.bashrc
in linux, copy the content frombash_profile_course
and paste it at the bottom of.bash_profile
. Otherwise, movebash_profile_course
to your home directory and rename it to.bash_profile
in mac or.bashrc
in linux. - Move the
git-completion.bash
andgit-prompt.sh
to the home directory~
. - Restart the bash.
Run the following Git configuration commands. Assume I am use vim
.
git config --global core.editor "vim -n -w"
git config --global push.default upstream
git config --global merge.conflictstyle diff3
After opening the terminal, you can choose Preference, and choose to import the SolarizedLight.terminal in the repository. The final step is to set this as the default profile.