The following are some of the most commonly used in work Git command , It is enough to develop and master these items at ordinary times , These are also arranged in the order of the process .
# Download a project and its entire code history
$ git clone [url]
# Create a new branch , And switch to the branch
git checkout -b [branch]
# View modified files
git status
# Add all files of the current directory to the staging area
git add .
# Submit staging area to warehouse area
git commit -m [message]
# Retrieve changes to remote warehouse , And merge with local branches
$ git pull [remote] [branch]
# Upload local designated branch to remote warehouse
git push [remote] [branch]
# Delete branch
git branch -d [branch-name]
# Delete remote branch
git push origin --delete [branch-name]
git branch -dr [remote/branch]
# Temporarily remove uncommitted changes , Move in later
$ git stash
$ git stash pop
Technology
Daily Recommendation