Here are two tips for setting git. First, modify git to have excellent unix features (automatically completed). After git is installed successfully, the installation directory will be left behind, this operation is for that directory. [Root @ localhost ~] # Cpgit-1.7.7.4contribcompletiongit-completion.bash ~.. Git-complet
SettingsGitTwo tips
First, the modification gives git excellent unix features (automatically completed)
After successful installation of git, the installation directory will be left behind. This operation is for that directory.
[Root @ localhost ~] #CpGit-1.7.7.4/conTrIb/completion/git-completion.bash ~. // Git-completion.bash // copy this file to a hidden file with the same name under the user's home directory
[Root @ localhost ~] # Vi. bashrc // Add the following sentence
Source ~ /. Git-completion.bash
[Root @ localhost ~] # Source. bashrc
Finally, enter the git work area for testing.
[Root @ localhost ~] #Cd/Git/StatUs/
[Root @ localhost status] # The following occurs when you run the git sta // tab twice.
Stage stash status
This prompt shows a lot of memory for us.CommandIt is undoubtedly a blessing.
Second, set the git command alias
Use the git commit command as an example.
Under normal circumstances, the following is a complete process
[Root @ localhost status] # vi st1
[Root @ localhost status] # gitDdSt1
[Root @ localhost status] # git commit-m "2nd commit"
[Master 41934ca] 2nd commit
1FileS changEd, 1 insertions (+), 0 deletions (-)
Create mode 100644 st1
Let's take a look at the comparison after setting the alias.
[Root @ localhost status] # vi st2
[Root @ localhost status] # git add st2
[Root @ localhost status] # git config -- globalAlias. Ci commit
[Root @ localhost status] # git ci-m "3rd commit"
[Master 6a5cb99] 3rd commit
1 files changed, 1 insertions (+), 0 deletions (-)
Create mode 100644 st2
We can use aliases to simplify commands.
Here is a summary of git's other tips and tips for future use.