look at Git commands:git config configuration git, general use does not need special configuration, but at least to set the developer's name and mailboxGit init and git add create a new repository and track files in the working directorygit clone clones a project from remote, including working directory and warehouseGit add puts the modified file into the cache area (staging areas), or this indicates that the conflict has been resolvedGit status Displays the status of the file, whether it has b
example of how to participate in open source projects hosted in GitHub. 0, install the configuration git1, first sign up for a GitHub account. NBSP;2, choose a project you like and fork. 3, establish a local resource pool (locally Repo). You can use the following command to copy the project locally, the address can be either SSH or HTTP, and the specific address can be seen in the project page. git Clone [emailprotected]:cocowool/php-daemon.git4, configuring the source project address.
The personal development operating system is the CentOS 6.5,git management tool that is installed by default.If no installation is found, you can install the latest version with Yum-install git, and by the way, it is recommended to install the matching graphical git toolThe "GITK" interface is a bit simpler, but it's also handy when viewing historical information.First, to do the user's relevant information configuration.1.git config--global user.name
whether to mergeGit pull origin Master is updating the code of the Origin repository to the local master Master branchGit log view commit information see your commit logGit log-p view log information and changes in the past see the same as the patch of the modified informationGit log-p-4 view log information and changes from the latest 4 timesgit log frameworks/see log information about frameworks/directory modificationsgit log--stat View log display file modification statusgit log--stat packag
gitk command to view the submission history and see which part of the code you have modified.
gitk
When you view the modified Code, Chinese garbled characters are found as follows:
Run the following git command to solve Chinese garbled characters:
git config --global core.quotepath falsegit config --global gui.encoding utf-8git config --global i18n.commitencoding utf-8git config --global i18n.logoutputen
is to use the diff command, such as 'git diff.. Master> ~ /Desktop/tmp. Patch ') to generate the patch file. Then someone else can use the 'git apply 'command to apply the patch, for example, 'git apply ~ /Desktop/tmp. Patch: load the patch to the current work branch.
Git friends
Git usage tips include using Git-included and attached powerful tools, including git SVN, git citool, gitk, and git automatic prompt scripts:
Git SVN: git and SVN can be eas
to compare and modify the files. It must:
Git reset filename so that you can view git diff
Git diff ffd98b291e0caa6c33575c1ef1_eae661ce40c9 b8e7b00c02b95b320f14b625663fdecf2d63e74c view the differences between two versions
Git diff ffd98b291e0caa6c33575c1ef1_eae661ce40c9
Git command alias
$ Git config-Global alias. CO checkout // CO is the alias of checkout.
$ Git config-Global alias.br Branch
$ Git config-Global alias. CI commit
$ Git config-Global alias. St status
$ Git config-global user. na
If you do not specify a file name and do not specify a branch name, but a label, remote branch, SHA-1 value, or something like master~3, you get an anonymous branch called detached head (the detached head identity). The modified code in this state needs to be checkout into a new branch to upload to master.If there is a conflict, you can use graphical MergetoolAlso, check the code churn for two commits, which can be compared on the command line with diff Commit1 Commit2. It's better to start a gr
actual description content when you enter the actual command .)
1. installation:
$ Sudo apt-get install git
$ Sudo apt-get install gitk # This is the installation of the official graphic interface, you do not need to install
2. cd to the first directory of the Code to be managed and the file
3. Initialization:
$ Git init
4. Add all contents of the current directory:
$ Git add.
5. view the status:
$ Git status
6. Add commit:
$ Git commit-am "firs
HEAD -- fileA
A last command is also usually added, like this.$ git config --global alias.last ‘log -1 HEAD‘
This makes it easy to see the last commit.
$ git lastcommit 66938dae3329c7aebe598c2246a8e6af90d04646Author: Josh Goebel
As you can see, Git simply replaces the alias with the corresponding command. However, you might want to execute an external command instead of a GIT subcommand. If that's the case, you can join in front of the command! Symbol. It would be us
Find the best git starter tutorial you've seen today
http://lostechies.com/joshuaflanagan/2010/09/03/use-gitk-to-understand-git/
Paste some commands
1. Git add to add files to staged area.2. Git commit commits staged file, and there are several options that are important:-a skips over staged area, commits directly, and the file name behind it skips the stage and commits directly. However, if the file is already in index, the new file will not be adde
-name] // pull the remote data to the local repository, it is not automatically merged to the current branch and still needs to be manually merged. Using tag pull git tag v1 // create tag git tag-a v1-m' create tag 'git show v1 // view tag version information ------------------------------------ automatic complementing function in linux -------------------------------------- in git Source git-completion in the contrib/completion directory. copy bash to your user directory. And add the following
remote repository git remote show [remote-name] // list remote repository details git remote rename old-name new-name // Rename the remote repository git remote rm [remote-name] // delete the remote repository ---------------------------------------- fetch pull git fetch [remote-name] // pull the remote data to the local repository, it is not automatically merged to the current branch and still needs to be manually merged. Using tag pull git tag v1 // create tag git tag-a v1-M' create tag 'Git
, because he is already the default is Utf-8 storageLog garbledAfter correctionFrequently used commands: the simple and beautiful git tutorials that I've seen so farHttp://rogerdudler.github.io/git-guide/index.zh.htmlThe Manual of this link is really simple and easy to read, so you must click to see it. Ubuntu (like Mac) on Git-gui boot: Start with the GITK command gitk This graphical tool, and then in the
commands that you think should exist. For example, to resolve the ease-of-use problem of canceling a staging file, you can add your own cancellation staging alias to Git:' Reset HEAD-- 'This causes the following two commands to be equivalent:--FileAA command is also usually added last , like this: $ git config--global alias. last log-1 HEAD This makes it easy to see the last commit: $ git last commit 66938dae3329c7aebe598c2246a8e6af90d04646author:josh Goebel date:tue 26 Span style=
maintainers, and commit, at this time push will fail, need to rebase operation and then push, as follows:$ git Fetchorigin$ git rebaseorigin/master $ git pushorigin //Upstream BranchOptional , default is the remote branch corresponding to the local branch$ GITK//graphical view of git log650) this.width=650; "src=" http://s10.sinaimg.cn/mw690/002Hmwlzgy6LUhOFw3D99690 "Name=" Image_operate_ 58451410249918679 "alt=" Git commands use summary "title="
SSL.If you don't need it, use no_openssl.
By default, git uses OpenSSL for sha1 but it will use it's ownLibrary (replicated red by Mozilla's) with either no_openssl orBlk_sha1. Also included is a version optimized for PowerPC(Ppc_sha1 ).
-"Libcurl" library is used by Git-http-Fetch and git-Fetch. YouMight also want the "curl" executable for debugging purposes.If you do not use http: // or https: // repositories, you do notHave to have them (use no_curl ).
-"Expat" library; Git-http-push us
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.