--staged #比较 Warehouse-Staging AreaLog View commit History--stat #展示提交的简略统计信息Undo Action$ git Commit--amend #重新提交 $ git reset HEAD filename #取消暂存的文件Checkout undo changes to a file$ git checkout filename# overwrites the workspace file# If staging area has changed files, then from staging area to workspace# If staging area files are not changed, th
one line of commands with the-m parameter followed by the commit description:$ git commit -m "Story 182: Fix benchmarks for speed" [master]: created 463dc4f: "Fix benchmarks for speed" 2 files changed, 3 insertions(+), 0 deletions(-) create mode 100644 READMEPush data to a remote repositoryProject to a stage, to share with others the current results, you can push data from the local warehouse to t
my_project.git [email protected] git.csdn.net:~ # Upload the repository to the servermkdir robbin_site.git cd robbin_site.git git--bare init # Create a pure warehouse on the servergit remote add origin [email protected] Github.com:robbin/robbin_site.git # Set up the repository addressGit push-u Origin Master # client First CommitGit push-u origin Develop # First submits the local develop branch to the remote develop branch, and the trackgit remote
protected] git.csdn.net:~ # Upload the repository to the servermkdir robbin_site.git cd robbin_site.git git--bare init # Create a pure warehouse on the servergit remote add origin [email protected] Github.com:robbin/robbin_site.git # Set up the repository addressGit push-u Origin Master # client First CommitGit push-u origin Develop # First submits the local develop branch to the remote develop branch, and the trackgit remote Set-head Origin Master
remote warehouse address) git remote RM Create a remote Warehousegit clone--bare robbin_site robbin_site.git # Create a version-only warehouse with a versioned projectScp-r my_project.git [email protected] git.csdn.net:~ # Upload the repository to the servermkdir robbin_site.git cd robbin_site.git git--bare init # Create a pure warehouse on the servergit remote add origin [email protected] Github.com:rob
Here is a simple summary of the main commands git, easy to remember, the summary of the bad, please tolerate, thank you! Want to see detailed explanation, recommend Liao Xuefeng great God's tutorial, the address is as follows: Http://www.liaoxuefeng.com/wiki/0013739516305929606dd18361248578c67b8067c8c017b000/The following references to thereadme.txt均为提交的文件1: Tell$ git
Learn more about GIT's checkout commandsThe checkout command (git checkout) is one of the most commonly used commands in Git, and it is also a dangerous command.Because this command overrides the workspace. The check Out command is used as follows:Usage one: git checkout [-Q] [Usage two:
Recently, I used git for version control. I found that git has many commands, so I can write down some common commands for viewing. The following content is a summary of this article, which is quite good. Let's take a look.
Certificate ------------------------------------------------------------------------------------
1. Initialize a git repository and use the git init command.2. Add files to the Git repository in two steps:
The first step, use the command git add , note, can be used repeatedly, add multiple files;
The second step, using git commit the command, is done.
with a versioned projectScp-r my_project.git [email protected] git.csdn.net:~ # Upload the repository to the servermkdir robbin_site.git cd robbin_site.git git--bare init # Create a pure warehouse on the servergit remote add origin [email protected] Github.com:robbin/robbin_site.git # Set up the repository addressGit push-u Origin Master # client First CommitGit push-u origin Develop # First submits the local develop branch to the remote develop br
Git project and submit it to GitHub.[Plain]View Plaincopy
mkdir TestDir CD TestDir
Touch readme.md
Git init #初始化一个本地库
git add readme.md #添加文件到本地仓库
git rm readme.md #本地倒库内删除
Git commit-m "First commit" #提交到本地库并备注, at which time the change is sti
Git project and submit it to GitHub.[Plain]View Plaincopy
mkdir TestDir CD TestDir
Touch readme.md
Git init #初始化一个本地库
git add readme.md #添加文件到本地仓库
git rm readme.md #本地倒库内删除
Git commit-m "First commit" #提交到本地库并备注, at which time the change is sti
Origin #To create a remote branchGit push Origin:#Delete the local branch (git br-d GIT Remote repository ManagementGit remote-v # to view the server address and the warehouse name of git Remotes show Origin# View Remote server warehouse status git remote add origin [email protected] gith
Introduction: git is a very good distributed version management system. I want to be a developer who is familiar with git, I also like git and GitHub for collaborative development ). Git commands are the GIT
a branch called "feature_x" and Switch to the past:git checkout -b feature_x2. Switch back to the main branch:git checkout master3, then delete the new branch:git branch -d feature_x4. Unless you push the branch to the remote repository, the branch is not visible to others :git push origin Update and Merge1, update your local warehouse to the latest changes, to do:git pull2. To get (fetch) in your working directory and Merge (merge) the remote change
protected] git.csdn.net:~ # Upload the repository to the servermkdir robbin_site.git cd robbin_site.git git--bare init # Create a pure warehouse on the servergit remote add origin [email protected] Github.com:robbin/robbin_site.git # Set up the repository addressGit push-u Origin Master # client First CommitGit push-u origin Develop # First submits the local develop branch to the remote develop branch, and the trackgit remote Set-head Origin Master
my_project.git [email protected] git.csdn.net:~ # Upload the repository to the servermkdir robbin_site.git cd robbin_site.git git--bare init # Create a pure warehouse on the servergit remote add origin [email protected] Github.com:robbin/robbin_site.git # Set up the repository addressGit push-u Origin Master # client First CommitGit push-u origin Develop # First submits the local develop branch to the remote develop branch, and the trackgit remote
GitHub without:sssh-keygen -t rsa -C"[emailprotected]"14.git remote Add Origin warehouse address associated repository15.git Push Origin Master pushes all contents of the local library to the remote librarygit push origin:master keeps the local repository and empties the remote repository16.git remote-v viewing the associated remote warehouse17.
Each person builds a HelloWorld project and exercises basic commands such as Git's add/commit/push/pull/fetch/clone. Compare the differences between the old and new versions of the project.steps to use:A) New HelloWorld projectb) Create a local repository and set up git mailboxes, user names, and more Create a Helloworld.java file locallyOpen git Bash and turn
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.