


How to install git and common git commands on linux
1. Install git
$ sudo aptitude install git $ sudo aptitude install git-doc git-svn git-email git-gui gitk
The git software package contains most of the git commands and is a must-install software package. The second line of commands is also a git software package, but it is released separately. You can Select Install.
2. Download the git library of the remote project to the local
[code] $ git clone git://远程git库地址 filename [code]
filename is the name of your local folder. Clone the remote library to this folder. This file is created by yourself.
3. Commonly used commands
(1)git branch 查看本地分支 (2)git branch -a 查看远程分支 (3)git checkout branchname 切换分支 (4)git add yourfile (5)git commit -a -m "描述" 提交你当前开发到暂存区,可以理解为你本地的git库 (6)git pull 更新,如果几个人同时在一个分枝上开发,可能会造成不同步,造成自己本地的git库落后或提前远程git库,这时候就要更新自己本地的库。 (7)git push 提交,将自己开发的代码提交到对应的远程分之上去 (8)git status 查看工作区状态,及查看在此分支上进行了那些操作 (9)git log 查看操作日志,还是挺有用的 (10)git merge 合并分支,自己开发的模块最终要合并到项目的总分枝上去,这是要先切换到项目总分支,然后 git merge 自己的分支 (11)git branch -d/d yourbranch 删除本地分支 (12)git push origin :yourbranch 删除远程分支
What versions of Linux are there?
Linux versions include: Deepin, UbuntuKylin, Manjaro, LinuxMint, Ubuntu and other versions. Among them, Deepin is one of the best-developed Linux distributions in China; Ubuntu Kylin is a derivative distribution based on Ubuntu; Manjaro is a Linux distribution based on Arch; LinuxMint's default Cinnamon desktop is similar to Windows XP and is simple and easy to use; Ubuntu is a desktop application Mainly Linux operating system.
The above is the detailed content of How to install git and common git commands on linux. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics











The five basic components of the Linux system are: 1. Kernel, 2. System library, 3. System utilities, 4. Graphical user interface, 5. Applications. The kernel manages hardware resources, the system library provides precompiled functions, system utilities are used for system management, the GUI provides visual interaction, and applications use these components to implement functions.

To install Laravel, follow these steps in sequence: Install Composer (for macOS/Linux and Windows) Install Laravel Installer Create a new project Start Service Access Application (URL: http://127.0.0.1:8000) Set up the database connection (if required)

Cryptocurrency data platforms suitable for beginners include CoinMarketCap and non-small trumpet. 1. CoinMarketCap provides global real-time price, market value, and trading volume rankings for novice and basic analysis needs. 2. The non-small quotation provides a Chinese-friendly interface, suitable for Chinese users to quickly screen low-risk potential projects.

Docker is important on Linux because Linux is its native platform that provides rich tools and community support. 1. Install Docker: Use sudoapt-getupdate and sudoapt-getinstalldocker-cedocker-ce-clicotainerd.io. 2. Create and manage containers: Use dockerrun commands, such as dockerrun-d--namemynginx-p80:80nginx. 3. Write Dockerfile: Optimize the image size and use multi-stage construction. 4. Optimization and debugging: Use dockerlogs and dockerex

How to set the SpringBoot project default run configuration list in Idea using IntelliJ...

About SpringCloudAlibaba microservices modular development using SpringCloud...

In IntelliJ...

Abstract of the first paragraph of the article: When choosing software to develop Yi framework applications, multiple factors need to be considered. While native mobile application development tools such as XCode and Android Studio can provide strong control and flexibility, cross-platform frameworks such as React Native and Flutter are becoming increasingly popular with the benefits of being able to deploy to multiple platforms at once. For developers new to mobile development, low-code or no-code platforms such as AppSheet and Glide can quickly and easily build applications. Additionally, cloud service providers such as AWS Amplify and Firebase provide comprehensive tools
