First, clone a remote git repository and CD into it:
$ Git clone git: // example.com/myproject$ CD myproject
Next, look at the local branches in your Repository:
$ Git Branch * Master
But there are other branches hiding in your repository! You can see these using-Flag:
$ Git branch-A * master origin/head origin/Master origin/V1.0-stable origin/experimental
If you just want to take a quick peek at an upstream branch, you can check it out directly:
$ Git checkout origin/experimental
Git official documentationGraphical tool gitk
1. Git Basic settings
$ git config --global user.name "Your Name"
$ git config --global user.email "[emailprotected]"
$ Git config -- List View configuration records
You can also enter the working root directory and run git config-E, which will only be valid for this workspace.
Link 1 link 2
2. Common commands Git init: create a local version Library Git Add "test.txt" add the specified file
$ git branch -r # list
origin/master
origin/next
...
$ git checkout -b masterwork origin/master
Capture branches from different version libraries and give a new branch name in your version Library:
$ git fetch git://example.com/project.git theirbranch:mybranch
$ git fetch git://example.com/project.git v2.6.15:mybranch
Create a list of version libraries that you want to work with regularly:
$ git remote add example git://example.com/project.git
$ git remote # list remote repositories
example
This article introduces that many software in Linux is not provided as binary installation package, but rather provides source code directly.Reasons for not providing installation packages: If you provide an installation package, you will need to provide a binary installation package for each version of Linux. Linux has a very large kernel version, so in order to reduce the size of the distribution package, the source code is provided directly for the user to compile and run directly.Git is a so
represented with a line feed (LF). In Windows A, represented with a carriage return (CR) and a line feed (LF) thus (CRLF). When you get the code from git this is uploaded from a Unix system they would only has a LF.6. Git status/gitk to check your changes, git commit to local repoNote:create Mode 100644The following flags is defined for the St_mode field:S_IFMT 0170000 bit mask for the file type bit fieldsS_ifsock 0140000 SocketS_iflnk 0120000 Symbol
Mac system comes with git, but comes with git version is very old, there is no automatic hint and GITK and other functions, if one to install very laborious.We used brew to install git very handy, but we found that it didn't work after the installation because the default git is still in the old version.in order to solve the same problems as I do, I now write down my solution and hope to help everyone. 1. Install brew First, then install git, brew ins
1. installation package Management System homebrewRuby-e "$ (curl-fssl http://raw.githum.com/Homebrew/homebrew/go/install)"2. Install gitsudo brew install git git-doc git-web git-gui gitk git-email git-svn3. Install Alfred (Mac efficient Processing)4. Mac Connection ServerIf it is a Linux server, Mac system built-in Windows Putty Software features, open terminal, input: SSH [email protected]If you are a Windows server, download Remote Desktop Connecti
Install GitA new ubunt system that requires git (the system does not have the tool), as follows:Enter the following command in the Terminel:sudo apt-get install git git-core git-gui git-doc git-svn git-cvs gitweb gitk git-email git-daemon-run git-el git-archNext you need to check SSHBecause GitHub uses SSH, you need to check in the shell to see if you can connect to GitHub:ssh -T git@github.comIf you see:
warning:permanently added ' github.co
not to produce any competitive tools: In October, 2005, McVoy contacted a customer using Comercially's licensed BitKeeper to require the employee to discontinue the customer to contribute to the Mercurial project, the GPL Source management tool. Bryan O ' Sullivan, employees reacted, "to avoid any possible perception of conflict, I volunteered for Larry as long as I continue to use the commercial version of BitKeeper, I will not contribute to development mercurial. ”From Http://wikipedia.qwika.
the patch to being removed is the first log entry and you can rungit reset--hard head^If you need to revert several patches, you can use git log to find the commit ID of the first commit before those patches.For instance, say you has applied, patches to the stable tree 3.4.17, and your want to revert those patches. git log would look like this:$ git log--pretty=oneline--abbrev-commit8901234 testing patch 21234567 Testing patch 15390967 Linux 3.4.171f94bd4 drm/i9 15:no Lvds Quirk for Zotac Zdbox
git git status//View status changes: Change meaning; Commit: Commit state (save locally) git commit-a//commit all, turn all changes into commit
Git commit-a-M "fill in the prompt statement you modified here"; This command can skip commit-a after the popup edit prompt statement editor gitk//graphical form git add d:////Add a file git commit-a--amend//Add this commit to the last commit git checkout-b issue88//Create and switch to Issue88 branch git
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.