Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the common commands of Git in Ubuntu

2025-04-03 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly shows you "what are the common Git commands in Ubuntu", the content is simple and clear, and I hope it can help you solve your doubts. Let the editor lead you to study and learn what are the common Git commands in Ubuntu.

1. Installation

Based on the Ubuntu system, the git installation commands are as follows:

# # install the main component of minimum dependency apt-get install git or # # installation includes all sub-packagesapt-get install git-all

2. View version information

Root@ubuntu:/home/run# git-versiongit version 2.17.1

3. Configure user information

# # configure user name, for example: rungit config-- global user.name run## configuration mailbox, example: run@263.comgit config-- global user.email run@263.com## configuration text editor, example: vimgit config-- global core.editor vim## configuration git coloring git config-- global color.ui auto## to view a configuration information Example: user.emailgit config user.email## view configuration information git config-- list## view configuration information and the file git config-- list-- show-origin

Example:

# # View configuration information and file root@ubuntu:/home/run/code/rockchip-bsp# gitconfig-list-show-originfile:/root/.gitconfig user.email=run@263.comfile:/root/.gitconfig user.name=runfile:/root/.gitconfig color.ui=autofile:/root/.gitconfig core.editor=vimfile:.git/config core.repositoryformatversion=0file:.git/config core.filemode=truefile:.git/config core.bare=falsefile:.git/ Config core.logallrefupdates=truefile:.git/config submodule.active=.file:.git/config remote.origin.url= https://github.com/radxa/rockchip-bsp.gitfile:.git/config remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*file:.git/config branch.master.remote=originfile:.git/config branch.master.merge=refs/heads/masterfile:.git/config submodule.build.url= https://github .com / radxa/build.gitfile:.git/config submodule.kernel.url= https://github.com/radxa/kernel.gitfile:.git/config submodule.rkbin.url= https://github.com/radxa/rkbin.gitfile:.git/config submodule.rootfs.url= https://github.com/radxa/rk-rootfs-build.gitfile:.git/config submodule.u-boot.url= https://github.com/radxa/u-boot.git## search Look at the configuration file root@ubuntu:/home/run/code/rockchip-bsp# cat ~ / .gitconfig [user] email = run@263.com name = run [color] ui = auto [core] editor = vim

Note:

1. Git config-h to view other parameters.

2.-- the configuration file corresponding to global: ~ / .gitconfig, which only needs to be run once, for the current user.

3. Git configuration file of the local warehouse: .git / config.

4. If configured for a git repository, you can omit the-global parameter or replace it with the-- local parameter.

5. Information such as name and email will be used for each git submission.

The above is all the contents of the article "what are the common Git commands in Ubuntu?" Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report