Summarize git version control commands commonly used in daily development and production------------------------------Main--------------------------------Pole Guest Town BuildingTo create a repository$ git clone $ git init #初始化本地版本库Ii. Modification and Submission$
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
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.
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
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
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.
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
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
Git distributed version control system, very abuse of a version of the management system, this post describes the common GIT commands, for not GIT version control of the rookie, for the maintenance of the GIT server Daniel, kneeling for advice, in fact, I am also a rookie.Gi
version control system.Git is free software.
Must be put inlearngitDirectory (sub-directories are also fine), because this is a git repository and it cannot be found in other places.
It takes only two steps to put a file in the GIT repository than to put the elephant in the refrigerator.
Step 1: use commandsgit addTell git to add the file to the repository:
$
Git common commands initialize the repository
Create a new warehouse to manage existing projects, enter the project directory and entergit init
PS: The command will create a. git directory, but will not proactively incorporate the files in the existing project (you need to add them yourself);
Clone Warehouse
Four status of files
you push the project OK.[email protected]:d Efnngj/hibernate-demo.git is the address of your common new warehouse. git switches to the new project, before push, with this sentence, the new warehouse we created is connected to the new project.Attention:1. The process of generating SSH keys can be consulted in the official documentation Https://help.github.com/articles/generating-ssh-keys2. Use git bash to e
1. Git document https://github.com/progit/progit/blob/master/zh/02-git-basics/01-chapter2.markdownhttps://github.com/progit/progit/tree/master/zhhttp://www.uml.org.cn/pzgl/201204285.asp if it is a Windows operating system, you can install a visual version controller: Turtle. In this way, you do not need to run the GIT command. Small turtle installation configurat
with a distant libraryGit push–u (not required for the first time with-U) Origin master pushes the current master branch to the remote librarygit clone https://github.com/tugenhua0707/testgit cloning from a remote repositorygit checkout–b dev Create dev branch and switch to Dev branchGit branch view all current branchesGit checkout master switches back to the master branchgit merge dev branches on the current branchgit branch–d dev Delete Dev branchGIT branch name to create a branchGit stash to
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.