3. Create a code version (git)

In a Renran virtual environment (PyCharm terminal)

Git add. Git config --global user.name renran '[email protected]' # git commit -m "v1" git log git reflogCopy the code

Create projects on the Git platform

  • Common code management platforms: GitHub, Gitee (code Cloud)

Create a repository on the code cloud

Code cloud network: gitee.com/gexzygg/das…

The created page is displayed

Recommended command line introductory tutorial

Git config --golbal user.name "aaa" git config --global user.email "[email protected] renran touch README.md git add README.md git mommit -m "first commit" git remote add origin https://gitee.com/gexzygg/renran git push -u origin master if there has been a warehouse CD existing_git_repo git remode add origin https://gitee.com/gexzygg/renran git push -u origin master 1. Git status allows you to check the code version status of the current project. Git reflog git reflog git reflog Git log () Git rm file # drop a single file git rm -rf directory # drop a directory # Drop a single file Git rm -rf.idea git rm db.sqlite3 # Git rm -rf.idea git rm db.sqlite3 # Git add. Git commit -m "delete unwanted files or directories" git push -u origin master ./git ./db.sqlite3Copy the code

Clone the project locally

If a Git repository directory with the same name exists in the current directory, cloning will fail

Git Clone repository addressCopy the code

Clone projects to new branches

Git branch dev -b dev git branch dev -b dev git branch dev -d dev # delete branchCopy the code

Git commit

Git commit -m 'add the project code' # commit the project to the local repositoryCopy the code

Push to the remote end

git push origin dev:dev
Copy the code

If you push the code, git pull appears… The current local and online versions of best code are different:

  • Take the code execution command that says that, pull it locally,git pull
  • Remove any extra conflicting queries as prompted, and add/commit/push again

Commit the local Diamante in the project to the code cloud

#. All files or directories in the current directory are submitted to the upload queue.
Change the current working directory to the project root directory CD ~/Desktop/renran/
git add .

Commit the local upload queue code to the local repository
git commit -m "Project initialization setup"

Set the remote repository address for your local Git version control software
git remote add origin https://gitee.com/moluo/renran.git

Submit code to the remote repository
git push -u origin master
Copy the code
  • Git push