some simple operations such as code.
First, give the test repository that was created at the beginning to RM.
8. Then start to clone git.
Okay. Do you see the test? It indicates that git has been cloned.
9. Then we try to modify the code.
10. Then upload
11. Then we push the code to the repository through git push.
12. OK. Let's take a look at some information.
Let's see where the branch is.
Gitk can see all the commits and modification
git command-line basic operations
Install GitThere are many Git installation tutorials on the Web, if you need a graphical interface, it is recommended to use Git GUI or gitk under Windows Tortoisegit,linux.
Git basic configurationgit config can configure git parameters and use git config--list to view the configured git parameters. There are three levels of save locations,--system 、--Global 、--Local, representing all users (this system),
. Replace the description content with the actual description content when you enter the actual command .) 1. Installation: $ sudo apt-get install git $ sudo apt-get install gitk # This is the official graphic interface for installation, do not install unnecessary. 2. Run cd to the Code to be managed, the first-level directory where the file is located. 3. initialize: www.2cto.com $ git init 4. Add all content in the current directory: $ git add. 5. v
configuration is P4P_REFPID| * | | 08201de89834f6fecb195c2b7c3546b5cafccc85 seconds kill discount floating layer Style | | |/ | |/| | * | 0f4d1df17f79c7aa3ca3d36ab848c10b78029010 Modify Icon | * | ae719fc29cc550321f284323db06a294b97c1398 P4P Creative Optimization | |/ | * a6d4501e1456589d30ab1a5800b651876629c8ca modify icon Git also has a lot of GUI tools that can provide visual branching charts, such as Gitk,qgit,gitx and so on. Remote Branch
+ pbzbiknzjrb1p9dtioepdq5ltgaqluez0ftezet1qh0pauaoxxeszahgpa9453rqj433EMG7HY30KOMOQVFP64T6QLTGFKIG9EMM9T8NY2R [email protected]Git protocol MythsUse the SSH protocol to avoid push entering a password every time.The prerequisite is to configure the SSH key in the account. [email protected] begins with the SSH protocol. Using the HTTPS protocol causes the user name and password to be entered each time.git Bash Command window and font size settingsMouse click on the Git Bash screen title bar, right
, you can add this file to the index after you manually resolve the conflict, and commit it with the git commit command, just as you normally modify a file The same. If you use GITK to see the results of a commit, you will see that it has two parent branches: one pointing to the current branch and the other to the branch that you just merged in.ii. resolving conflicts in a mergerIf you do not succeed with automatic merging, git sets a special state in
When configuring the SSH public key of the personal center, when the client pulls the replacement code, the following error is indicated:Cloning into ' comix-b2m ' ... Gogs:internal errorfatal:could not read from remote repository. Please make sure the correct access rightsand the repository exists.Once considered SSH public key configuration problemBack-end Serv log error as follows;EXEC: "Git-upload-pack": Executable file not found in $PATH The original is gogs default value under/bin find Bi
Beyond Compare or gitk diff , comparing the difference between the content of dictation and the real content;9 , re-use Cooleditpro control your own wrong point a sentence repeatedly listen, know really understand why did not hear it;Ten , careful analysis of the cause of the error, hearing problems lead to the recognition of the word did not hear it? Vocabulary problems, words do not know at all? The grammatical problem, the subjunctive mood should
Reprint: http://lishicongli.blog.163.com/blog/static/1468259020132125247302/The first thing to make clear is that the git operation revolves around 3 big steps (virtually all SCM ) 1. fetching data from Git (git clone) 2. Change the Code3. transfer the changes back to git(git push) These 3 steps involve two repository, one is remote repository, and the other is the local repository, Again on your own work area. Which 1, 3 Two steps involving the remote Server/remote repository/
git config -- global alias. co checkout git config -- global merge. tool kdiff3 git config -- global meregtool. kdiff3.path "/usr/bin/kdiff3" git config -- global alias. visual "! Gitk "create a file ~ /. Gitignore_globalShell code # compiled source ####################*. com *. class *. dll *. exe *. o *. so *. pyc # Packages ############# it's better to unpack these files and commit the raw source # git has its own built in compression methods *. 7
commit is committed, so the meaning is 23ad9ad and 16b36c6 the two commits on the topic branch, the rest on the master branch.While this is a good choice for simple projects, you might prefer to GITK or sourcetree these more powerful visualization tools to analyze large projects.Custom formatsFor other git log formatting needs, you can use the --pretty=format:" options. It allows you to output commits using placeholders like printf.For example, the f
is only showing the remote branchIn the case of different branches using the git diff command, the difference is that git fetch does not automatically merge, so what do I want to do with merge?With the git merge command, the merge branch, as expected, there should be a conflict between the two branches, when the merge will be an error, and then have to resolve the conflict before merging, you can have the following situationWhat??? Sunglass (▔︹▔ㄟ) (╯▔︹▔) ╯Already up-to-date description has been
commit solves or the usecase for a new feature. justify why you chosethe particle solution. describes the problem to be submitted or the new use case. Demonstrate why you chose this specific solution. Do
Write the summary line and description of what you have done in the imperative mode, that is as if you were commanding someone. write "fix", "Add", "change" instead of "fixed", "added", "changed ".
Write a summary and describe what you have done in the command line mode. It is as if y
create a file named" _ netrc.
3. Open the _ netrc file in notepad, enter the GIT server name, user name, and password, and save the file. Example:
The URL submitted by machine to the server (no port number is required)
Login Username
Password
Common git operations
I. Command operation:
1. View local branches in git Branch
2. view the remote branch in git branch-R
3. Check which files have been submitted (COMMIT), which files have not been submitted, and which files have been
classic usage. Suppose you have a long history like A-1-2-3-4-5-6-7-8-B. At this time, you suddenly found that there was a mistake in the first place, but you didn't want git reset B ~ 8. After modification, rewrite the submission information one by one. Now you can use git rebase --. In fact, it is very simple. Suppose we have an error on the node 1. First, I cut a branch temp in step 1 and switch it over to make changes. After the change, I useGit commit -- amend,That is, rewrite the submiss
Android Studio has recently been upgraded to Android Studio 1.2.1.1 two times, and it's getting easier to use. As is a mainstream source management tool that allows developers to submit and manage code without leaving as.Here's a demonstration of using Git to manage code in as.Select the code you want to submitRight-click->commitWrite a commit messageYou can select commit and push to complete the commit actionconfirm after pushView submission History and compare filesSummarize:Git knows that at
Back up vi/etc/apt/sources. list and keep only debhttp: // logs
Back up
Vi/etc/apt/sources. list
Keep only
Deb http://ftp.de.debian.org/debian sid main
Su
Apt-get update
Apt-get install git
Root@www.linuxidc.com:/home/dd # apt-get install gitReading the package list... completeAnalyzing the dependency tree of the software packageReading status information... completeThe following additional software packages will be installed:Git-man liberror-perlRecommended software packages:Git-daemon-
? Because Git is a distributed version control system, we need several people to work in the same version library later. If you use 1, 2, 3 ...... As the version number, it must conflict.
When many records are submitted, we only want to view one of the records. You can add the id of the corresponding record to the end of the log command and add the-l parameter. That is, git log [id]-l
If you want to view the modified content of the record submission record, you can add the-p parameter. That is,
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.