Tools --- Git use

Creating a remote repository Github

  • Prime Minister create a repository on GitHub website: upper right corner of the plus ➕ , select the new repository

 

    

 

  • Then create edit warehouse: name, description, whether public, language, style and other information branch. Then create.

    

 

  • Copy the address of the warehouse

    

Remote repository to a local drop-down

  • First to enter the working directory folder: cd pywrod / GitProject /
  • Drop-down warehouse to a local folder: git clone https://github.com/guoyapeng/GitText.git
  • Down into the drop-down folder: cd GitText
    • View the contents of the folder: LS
    • Production see the current work status: git Status
      • On branch master
      • Your branch is up to date with 'origin/master'.
      • nothing to commit, working tree clean

Local py create a virtual environment

  • Create a virtual python development environment: python3 -m Venv .venv
    • Create a virtual environment with built-in venv python3 module, it can be used more than python3.6
  • Activated just created a virtual environment: Source .venv / bin / of an activate
  • At this time, view the status and git status request does not change, the instructions to create a virtual environment git no trace file
  • This is because our virtual environment file is loaded into the .gitignore file, added to this file will be ignored

Create a local branch warehouse

 

# 创建 develop 分支
git branch develop
git checkout develop
git add .
git commit -m "create new develop branch"
git push --set-upstream origin develop

 

 

 

 

 

 

 

 

 

 

 

 

Guess you like

Origin www.cnblogs.com/TMMM/p/12077601.html