#设置用户名密码
# by ordering git init to turn the current directory into a repository that git can manage, as follows:
#使用命令 git add Readme.txt to staging area inside.
#用命令 git commit to tell git to commit the file to the repository.
#查看是否还有文件未提交
#查看文件到底改了什么内容
#查看修改记录
Clear version
#回退到上一个版本的命令如下操作
To testgit Run the command #添加远程仓库在本地的 warehouse:
Git remote add Origin https://github.com/tugenhua0707/testgit.git
#推送
Git push Origin local branch: remote Branch Name
Clone a local library #命令git clone
#创建与合并分支
--------------------------------------------------------
Git The basic common commands are as follows:
MKDIR:XX (Create an empty directory XX refers to the directory name)
PWD: Displays the path to the current directory.
Git init turns the current directory into a manageable git repository, creating a hidden. git file.
git add xx adds xx files to the staging area.
Git commit–m "XX" commits a file –m followed by a comment.
Git Status View warehouse status
git diff xx View xx file modified those content
git log View history
git reset–hard head^ or git reset–hard head~ fallback to previous version
(If you want to fallback to 100 versions, use Git Reset–hard head~100)
Cat xx View XX file contents
Git reflog View history's version number ID
Git checkout-xx all the changes to the XX file in the workspace.
git rm xx Delete xx file
Git remote add Origin https://github.com/tugenhua0707/testgit associated with a distant library
Git push–u (not required for the first time with-U) Origin master pushes the current master branch to the remote library
git clone https://github.com/tugenhua0707/testgit cloning from a remote repository
git checkout–b dev Create dev branch and switch to Dev branch
Git branch view all current branches
Git checkout master switches back to the master branch
git merge dev branches on the current branch
git branch–d dev Delete Dev branch
GIT branch name to create a branch
Git stash to hide the current job and resume work after resuming the site.
Git stash list view all hidden file lists
Git stash apply to recover hidden files, but the content is not deleted
git Stash Drop Delete file
Git stash pop recovers files while also deleting files
Git Remote to view information
Git remote–v View details of remote libraries
Git push origin master git pushes the master branch to the remote branch corresponding to the remote library
How to use Git