Common commands for git submission code: 1. [git log] to view the records of git merge; 2. git pull to re-pull the code from the server; 3. git status to view the local code status; 4. git add to local code All codes are submitted; 5. You can see the current working branch with the git branch command.
The operating environment of this article: Windows 7 system, git2.30.0 version, Dell G3 computer.
Common commands for git submission code:
1. Master branch code submission process
git log Check the git merge Record
git pull re-pull the code from the server and update the local code to the latest code on the server
git status Check the status of the local code and see if there is any code to be submitted
git add . Submit all the local code
git commit -m "Incorporate new PUCCH and cell power code" Add comments for this submission
git push origin HEAD:refs/for/master Push the submitted code Go to the main branch
# This If you want to refund the version, use the Git Reset command, Git Reset-SOFT 1C8C4031156E668B4B375DB8D6D2893DFC03ED4A back to the recently submitted state,-Soft The parameter indicates that local modifications are retained, and the --hard parameter indicates that local modifications are not retained.
You can use git commit --amend to achieve incremental submission
2. Master branch and 2.08 Branch switching method
The git branch command can see the current working branch. The current working branch is master
Enter the git branch -a command to view All branches in the git library, you can see that this command lists all branches
Enter git checkout -t remotes/origin/208 to switch to remotes The /origin/208 branch is the 208 branch. You can enter git branch again to view the current branch and find that it has been switched to the 208 branch.
If you want to switch back to the master branch, because the master branch has been formed locally, the switching command is slightly different. The -t parameter is removed, and the branch name is written as the local branch. The name can be: git checkout master
When switching to branch 208 again, because branch 208 has been formed locally, the switching command is slightly different, remove -t parameters, and the branch name can be written as the name of the local branch: git checkout 208
3. 2.08 branch code submission process
208 branch modifications and code submissions need to be done in the 208 branch. For the switching steps, see step 2. The code submission process is basically the same as the master branch, except that the last step needs to be written as git push origin HEAD:refs/for/208, that is, submitted to the 208 branch. The previous steps are basically the same as the master branch. You can refer to step one.
git pull Before submitting the code, update the code to the latest code
The above is the detailed content of What are the common commands for git submission code?. For more information, please follow other related articles on the PHP Chinese website!

GitHub is a Git-based version control system hosting platform that provides version control, collaborative development and community communication functions. Using GitHub can improve development efficiency and code quality.

Git and GitHub are different tools: Git is software for version control, and GitHub is an online platform based on Git. 1.Git allows you to track file changes and collaborative development. 2. GitHub provides code hosting and collaboration tools to enhance team development efficiency.

The core features of GitHub include version control, branch management, code review, issue tracking and project management. 1. Version control and branch management are based on Git, allowing tracking of code changes and experimental development. 2. Code review is implemented through PullRequest to improve code quality and team collaboration. 3. Issues tracking and project management are carried out through Issues and the project management board to improve project transparency and traceability.

GitHub is a powerful tool to improve the efficiency and quality of software development. 1) Version control: manage code changes through Git. 2) PullRequests: Conduct code review and improve code quality. 3) Issues: Track bugs and project progress. 4) GitHubActions: Automate the construction, testing and deployment process.

Git is a version control system, and GitHub is a Git-based code hosting platform. Git is used to manage code versions and supports local operations; GitHub provides online collaboration tools such as Issue tracking and PullRequest.

Git is an open source distributed version control system that helps developers track file changes, work together and manage code versions. Its core functions include: 1) record code modifications, 2) fallback to previous versions, 3) collaborative development, and 4) create and manage branches for parallel development.

Git and GitHub are not the same thing. Git is a version control system, and GitHub is a Git-based code hosting platform. Git is used to manage code versions, and GitHub provides an online collaboration environment.

The reason for using GitHub to manage HTML projects is that it provides a platform for version control, collaborative development and presentation of works. The specific steps include: 1. Create and initialize the Git repository, 2. Add and submit HTML files, 3. Push to GitHub, 4. Use GitHubPages to deploy web pages, 5. Use GitHubActions to automate building and deployment. In addition, GitHub also supports code review, Issue and PullRequest features to help optimize and collaborate on HTML projects.


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

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Zend Studio 13.0.1
Powerful PHP integrated development environment

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool

WebStorm Mac version
Useful JavaScript development tools

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft