git clone
obtains a remote Git repository corresponding to a url. The
general format is git clone [url].
git pull pulls the warehouse file
git pull origin repo pulls the repo branch file
git status
queries the status
git add
Submit new files or modify them to the buffer
git add file[file...] Single or multiple files
git add -u: Add file modification and file deletion to the temporary storage area.
git add .: Add file modification and file creation to the staging area.
git add -A: Add file modification, file deletion, and file creation to the staging area.
For the first submission, you need to configure the local
git config –global user.email “email address”
git config –global user.name “name”
git commit -m 'commit message' Submitted information description
git push origin Branch name column master Submit
Update Code
git pull origin branch (branch name)
git pull update code
git branch new branch //To create a new branch
Check if the creation is successful git branch
git checkout new branch //Switch to a new branch After
switching , you can use git branch to confirm whether the switch is successful. Submit changes to a new branch
git add .
git commit –a
to view the commit status, if successful, return the branch to be merged commit
git checkout master //Switch to the master
branch and merge the new branch into the current branch
git merge new branch to
view the conflict
git diff
problem Solve the commit code
git push origin branch name
delete branch
git branch -d repo (branch name) delete local repo branch
Common usage of git
Guess you like
Origin http://43.154.161.224:23101/article/api/json?id=326359067&siteId=291194637
Recommended
Ranking