First create a folder locally, and then initialize the git repository:
git init
Next clone the project on github:
git clone write your project address here
Then you can modify, delete, and submit the code
If you need to develop on a new branch :
Check out the remote branch:
git branch -a can view remote branches, remote branches will be shown in red
If you can't find it, try:
git fetch
git pull
Or if there is no branch, you can create a branch for development:
# This step is to establish a local branch. After the establishment is completed, a corresponding branch will be established on the remote end after one push is required.
git checkout -b branch name is equivalent togit branch
branch namegit checkout
branch name
After development is complete: we commit to our branch:
git add filename
Then switch back to our main branch, which generally defaults to master:
git checkout master
Finally we need to merge these two branches:
git merge The name of the new branch we just created
After the merge is complete (remember to push once), we can delete the branch:
git branch -d dev
Then delete the remote branch:
git push --delete origin branch name