git work Summary 2

Objective: To add a new file (the code) on a remote branch

1, clone branch

git clone -b branch url

cd to the folder, add files to change directory

2, create a new branch and switch

git checkout -b dev (new local branch)

3, add files to the branch (local)

git add file name

4, submitted

the commit -m Git ' description '

5, push the remote branch

git push origin local branch (new): remote branch

Guess you like

Origin www.cnblogs.com/wt7018/p/12064419.html