1. Basic operation of gitlab
git branch // view branch
git branch dev //New dev branch
git checkout dev //Switch to dev branch modification ****
git status // see which files have been modified
git add . //Modified files need to be submitted and added (note the . dot)
git commit -m "update" // Commit additional information "update"..
git status // Ensure that all modified files are submitted, and only when there are clean partitions can they be pushed
git remote -v // View the location that needs to be submitted
git push origin dev:dev //push from lwq branch to lwq branch
git branch -m lwq dev // modify lwq branch to dev branch
2. Pull the code under the specified branch (eg: dev)
git clone -b dev xxxxxxxxxx
-b dev : Refers to pulling the code under the dev branch
3. Solve the problem that the account number and password need to be entered every time git under the ubuntu system
If there is no .gitconfig file in the directory, you need to manually write the content
4. Obtain the command of the specified version and specified commit:
First, get the specified branch:
git clone -b [branch-name] [git-url]
Then cd in the folder under the current clone, enter
git reset --hard [commit-number]