Being familiar with Git team development is a necessary skill for a programmer. I have been in the pit for a long time, but my use of Git is still in a confused stage. By sorting out notes, I hope I can help myself clarify the use of Git by the basic team, and also hope to help my friends who need it.

The main process steps used by Git are mind mapped.



Upload the native code to Gitee

1) create a remote warehouse in gitee: get remote warehouse address and personal configuration information Remote warehouse address: https://gitee.com/plusyu/webxxtx-ui.git personal information: Git config --global user.name "plusyu" git config --global user.email "[email protected] User. name "plusyu" > git config --global user.email "[email protected]" 3) Initialize the current project in the local xxtx-ui directory > git init Xxtx-ui > Git add * xxtx-ui > Git commit-m "initialize commit" xxtx-ui > Git status # check the status of the repository Bind the local repository to the remote repository (one local for one remote, only bind once) xxtx-ui > git remote add origin https://gitee.com/plusyu/web_xxtx-ui.git xxtx-ui > git push origin master

5) The team uses Git:

  1. Get the code (symbol > stands for local)

    > git clone XXX. Git
  2. Crew members open via VS Code
  3. Crew members install project dependencies and test run them

    CNPM install CNPM run serve
  4. Team members complete their own modules
  5. Submit code

    The first step is to tell git to add a file to the repository with the command git add: Git add * (*) git add * (*) git add * (*) git add (*) Git push origin master git reflog git push origin master git reflog

    Note:

    Don't touch other people's code! Submit code on your own branch on your own page! If the system tells you that the local version is lower than the remote repository version, pull then push git pull first add locally and then push remotely. The.gitignore file is configured to ignore Git files to configure something messy and big that doesn't need to depend on: such as node_modules

Branch of 6.

Git branch :git branch :git branch :git branch :git branch :git branch :git branch: Dev_charles-> dev > git checkout dev > git merge dev_charles

7. Configure Git files

> git config --list: change the remote repository address of the binding, enter the config configuration file > vi. Git /config

Note: Make it a habit to look at Git state frequently