60git and gitLab to use

A combined branch 
1 is switched to the main branch and down
C: \ Users \ long MTI \ Desktop \ Audit-HTML> Git Branch
C: \ Users \ long MTI \ Desktop \ audit-html> git checkout develop-2.0 .3
C: \ Users \ long MTI \ Desktop \ Audit-HTML> Git pull
2, switch to your branch, merged with the main branch, and pushed to the remote
C: \ Users \ long MTI \ Desktop \ audit- HTML> Git Checkout custom_white_list
C: \ the Users \ long MTI \ Desktop \ Audit-HTML> Git Merge 2.0.3 Develop-
C: \ the Users \ long MTI \ Desktop \ Audit-HTML> Git Push
. 3, switching to the main branch and his own branch of the merger in the past, and pushed to the remote
C: \ Users \ long Yang Technology \ Desktop \ audit-html> git-2.0.3 Develop Checkout
C: \ Users \ long Yang Technology \ Desktop \ audit-html> git custom_white_list Merge
C: \ the Users \ long Yang Technology \ Desktop \ audit-html> git push
Second, only their own (the commit git git the Add --- --- git the Push)
1, write the file: echo "# 2018_3_18" >> README .md
2, establish the work area: git init (workspace)
3, added to the staging area: git add README.md (modified files in the folder will turn red)
4, added to the historic district: git the commit -m "First the commit"
5, connect to a remote repository: git remote Origin https://github.com/AAA/BBB.git the Add
. 6, pushed to the remote repository: Git push (-u) Origin Master
. 7, the code is written after repeated 3,4, git push (origin master) .

three, pull, project
1, item clone: clone https://github.com/AAA/BBB.git Git
2, to branch: git branch fenzhi
Note: 2 and 3 may be combined into Checkout -b fenzhi Git
3, switching to the branch: git Checkout fenzhi
4, write code
5, added to the staging area: git the Add README.md
6, added to the historic district: git the commit -m "First fenzhi"
(6.5 switch to the master branch)
7, git pull Origin Master
(7.5 to fenzhi handover branch)
8, merging branches: git merge fenzhi


IV pull, project in its own branch
. 1, Git pull Origin fenzhi
2, 4 from the three repeated

five conflict prompt
`` `html: run
<<<<<<< HEAD
content submitted to the local server (I wrote)
=======
server to download to the local content (written by others)
>>>>>>> b0ef58d69851fedad4169878a62033c0ce16246c
`` `
Six, process git management code (master for the main branch's)
1, clone project: git clone https://github.com/AAA/BBB.git
2, connected to a remote repository: git remote add origin https: // github. COM / the AAA / BBB.git
. 3, the establishment of branches: branch fenzhi Git
. 4, switching to the branch: Git Checkout fenzhi
. 5, write code
6 is added to the staging area: Git the Add README.md
. 7, added to the history area: git commit -m "First fenzhi"
. 8, switch to the master branch,
. 9, Git pull Origin master
10, fenzhi switch to branch
11, merging branches: Git merge fenzhi
12 is, Git Push -u Origin master
Note:3 and 4 can be combined into git checkout -b fenzhi

seven branches of knowledge about
1, their branches: changes - Submit - pull - push
2, where the branches of their own group: change - Submit - pull (resolution of conflicts) - push
3, switch to branch others: pulling (must) - change - Submit - pull - push

eight, gitLab merging branches
Merge Request ---- New merge request ---- select "branch source" and "target branch" ---- click on "Compare branches and continue" ---- ---- simply fill in a description click "Submit merge request"

nine, git merge branch
git branch merge: pull the main branch ---- create and switch to a new branch digitally altered ---- ---- ---- submitted to switch back to the main branch ---- ---- submit merge the new branch (mixed upcoming new branch to the main branch) ---- switch to a new branch - - merge main branch (main branch soon incorporated into the new branch)

ten, gitLab inquiries in a branch of a commit:
(1) select the branch;
(2) click on the following repository commit;
(3) click on a particular commit the instructions.

Eleven, gitlab roll back to a specific version of the code - local + remote
1, with "git log" command to find commitid
2, with "git reset --hard {commitId}" local file command rollback
3, with "git push -f "command will roll back the remote file

XII Taobao use npm mirror
https://blog.csdn.net/quuqu/article/details/64121812 source
1. temporary use (used)
npm --registry HTTPS: / Express install /registry.npm.taobao.org
2. sustainable use
npm config set registry https://registry.npm.taobao.org
after successful authentication can be configured by the following manner
npm config get registry info Express or NPM
3. CNPM by using
npm install -g cnpm --registry = https: / /registry.npm.taobao.org
use
cnpm install express








Guess you like

Origin www.cnblogs.com/gushixianqiancheng/p/10966984.html