Git was used in recent work and a simple record was made:
1. project view or execution for test environment and online environment: git initialization: git initgit pull code: git pull git@127.0.0.1: Project. git 2. project develo
code to GitHub, the description is displayed on the code file information.The above steps are just a matter of submitting the code to the local repository.The third step is to upload the code to the remote repository, which is GitHub.git remote add origin [email protected]:xxx/xxx.gitThe following [email protected]:xxx/xxx.git is the SSH URL generated on GitHubIf you want to modify, you can open the config file inside the. git file for modification.N
When using a git command that can has a large amount of output (like git log , git diff or git blame ), Git opens the command outpu T in our terminal "pager"; On most modern unix-based
Article reprinted from: http://blog.csdn.net/think2me/article/details/39056379Bo Master said without my permission, not reproduced, then do not post, copy the key parts for the memo1. Staging area is a very important concept for git, figuring out staging area, and figuring out what a lot of git's operations are doing. 2. Git manages the modification, not the file, so commit will only submit a change of the
1. Configurationgit config--global user.name "your name"git config--global user.email [email protected]git config--global color.ui truegit config--global core.editor vigit config--global alias.lol "log--graph--all" set alias so that LOL is your new command.2. Basic use1. Display the current configuration informationgit config--list2. Create RepoGet it from somewh
In the development debugging process, you need to constantly update the code to the Git library, and then use the latest code in the GIT library to update the running Docker container, there are now two ways, it is recommended to use the second.
1. Execute the git
Git command Quick Reference (using git Appendix A) 1. initialize the global user name and email address git config -- global user. name "Your Name" git config -- global user. email "youe@example.com" allows you to set a separate user name and email address cd/path/to/repogit
Git uses1. Git pull update server code to locala). Git pull Origin Master is updating the code of the Origin repository to the local master Master branch2. Git push commits the local code to the server3. Git log View submission in
version 0.1 released
$ git tag v0.1//Can view the label information including text description
You can also sign a label with the private key through-s:
$ git tag-s v0.2-m "signed version 0.2 released" fec145a
Signed with PGP signature, therefore, must first install GPG (GnuPG), if not found GPG, or no GPG key pair, will be error:
Gpg:signing Failed:secret Key Not available
ERROR:GPG failed to sign the
Simple Git command quick query table (Chinese Version)
Create
Copy A created warehouse:
$ git clone ssh://[emailprotected]/repo.git
Create a new local repository:
$ git init
Local Modification
Display the modified files in the working path:
$ git status
Different f
: $ git branch-rCreate local branch: $ git branch [name]----Note that the new branch will not automatically switch to the current branch after it is createdSwitch Branch: $ git checkout [name]Create a new branch and switch immediately to the new branch: $ git checkout-b [name]Delete Branch: $
version 'Download codeIf you want to download the code that's hosted on Git, just know the code-managed path and enter:$ git clone https://github.com/libgit2/libgit2If you want to rename the download to a local directory then enter:$ git clone https://github.com/libgit2/libgit2 foldernameThis will perform the same action as the previous
Git command Quick Check form Chinese versionCreate To copy a warehouse that you have created: $ git clone ssh://[email protected]/repo.git To create a new local repository: $ git init Local modifications Show modified files under work path: $ git status Display differs from
version 'Download codeIf you want to download the code that's hosted on Git, just know the code-managed path and enter:$ git clone https://github.com/libgit2/libgit2If you want to rename the download to a local directory then enter:$ git clone https://github.com/libgit2/libgit2 foldernameThis will perform the same action as the previous
In Android Studio, how does Git update the local remote branch list ?, Androidgit
For example, if your colleague adds branch xxx in Git's remote branch, but you find that when you view the existing branch in Android Studio, you cannot see the branch he added. If you view branch, please stamp this: how does Android Studio view the branch list and switch branch,
The comma
Git command Quick Check form Chinese version
CreateTo copy a warehouse that you have created:$ git clone ssh://[email protected]/repo.gitTo create a new local repository:$ git initLocal modificationsShow modified files under work path:$ git statusDisplay differ
Gitbook is a command-line tool (node. JS Library) that we can borrow to make beautiful books using Github/git and markdown, but it's not a tutorial on git.Supports multiple formats for outputGitbook supports the output of multiple document formats, such as:
Static site: Gitbook The default output of this format, the resulting static site can be directly hosted on the GitHub pages service;
PDF:
, specify the location of the local warehouse, as per personal custom, for example, where the project source code is selected in the same directory
Click OK to create a complete local warehouse, note that this is only local. Below the project source code to add to the local warehouse.
The following figure is what git does with the three commands that are submitted, the Add command adds the file from the ID
information, submitted title and time): $ git log Show all commits (only the submitted hash and message are shown): $ git log--oneline Show all submissions for a user: $ git log--author= "username" Show all changes to a file: $ git log-p Who, at what time, modified what content of the file: $
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.