checkout-b branch-name origin/branch-name local branch for creating and remote branchGit branch--set-upstream branch-name Origin/branch-name Establish Association of local and remote branchesgit tag Git tag-a Git tag-s git tag View all tagsGit push origin Git push origin--tags can push all the local tags that have not
0x00 background
Cve-2014-9390 is a recent fire bug, a git command could cause you to be hacked, I'm not going to delve into the details of this loophole, the authorities are already https://github.com/blog/1938- Git-client-vulnerability-announced and http://article.gmane.org/gmane.linux.kernel/1853266 have released detailed information. In short, if you use
public key generated before the first can not set the password, or each git pull will require a password.
2. Do not submit the compiled intermediate files in the project to S1, such as the file in the build directory in the CMake project, the files in the target directory within the MAVEN project. Otherwise, the next time the client uses Git pull, such as C2, will report a similar error:
error:untracked wo
the following two lines of command fix the problem:You need to pull the code first to push the upload successContinue with the following actions(1) Git remote add origin [email protected]: Lanyanjing-2016/mygittest.git(2) Git pull Origin Master(3) Git push-u origin MasterThis [email protected]:xxx/xxx.git is the addre
Git command,Git config -- global user. name "xxx" # configure the username git config -- global user. email "xxx@xxx.com" # configure the mail git config -- global color. ui true # git status and other commands automatically color
Git clone-b feature-notice
After cloning this branch git branch, under Feature-notice, now want to pull/fetch the latest code on the line, modified Commit/push
How exactly? Direct git Pull/fetch, and Commit/push.
Git clone-b feature-notice
After cloning this branch git
If you are unfamiliar with the git command line, use the Git graphical interface tool, which is more appropriate. It is recommended that you use a tool such as Tortoisegit, which has a high cost of time from learning to flexible mastery.
1, add
# git clone git@192.168.10.2
details stash // a cache mechanism Status // view git status gitk // graphical interface to view all the COMIT of the current branch, similar to the gitlog GUI version
Most git commands require the current directory (or the ancestor directory of the current directory) to exist. the GIT folder can be executed only in the following situations: 1.
topic1 View the branch's SHA1 value ca82a6dff817ec66f44342007202690a93763949==================================================================== Branch ================================= =====================================$ git Branch local branch*-R Remote Branch origin/-a all branch * Master remotes/origin/master$ git branch-v2in-vv display trace relationship 2 in Li
To create a version library$ mkdir Learngit$ CD Learngit$ pwd//used to display the current directoryInitialize a git repository using the git init command.? Add text ? To a git repository in two steps:The first step, use the command git
Tags: git principle operations
Status description
Remember that all files in the working directory are in either of these statuses: tracked or not tracked. Tracked files are files that have been incorporated into version control management. They are recorded in the previous snapshot. After a period of time, their statuses may not be updated, modified or placed in the temporary storage area. All other files are not tracked. They neither have snapshots
say in front:When I first started working with Git in an internship, it was a git visualizer, but it was limited to cloning libraries, switching branches, crawling, and pushing, not knowing the fundamentals. Read the Liaoche teacher git tutorial, the benefits are quite abundant. In particular, thanks to my colleagues at work, he strongly advised me to use the
push origin v1.5 # push a tag git push origin -- tags # push all tags
Branch
Git branch testing # create branch git checkout testing # Switch the working directory to the branch git checkout-B iss53 # create a branch and switch to the branch git checkout-B my2.6.14 v2.6.14
Recently learned the git command to manipulate the library, found that git commands, although not much (of course, is not very small), but they are very powerful combination of functions, more importantly, many commands in different states do not play the same effect, this blog summarizes the git
1, add# git clone git@192.168.10.202:develop/test.git# CD Test# Touch Test.txt//test files# git add test.txt//git adding files# git commit-m ' Test '//Add to local version library# git push//push to remote
If push complains, perh
Mac OS X command line submit local project to Git
In the past, Git was used on the GUI. Today, we have the opportunity to perform a practical operation on the text interface. I recorded the process for anyone who needs it.
Note: The starting position of $ is a command line ($ does not belong to a
commandgit stashPost a work backup after a temporary cleanup workspace as a repository for urgent modification of defect scenariosgit stash listView the work site for backupgit stash applyResume work sitegit stash dropDelete the previous backup sitegit stash popRestore and then delete the previous backuprebase commandgit rebasegit mergethe effect is similar, but git rebase no longer contains the branch of the commit information eventually log is a st
Associated users:$ git config--global user.name "YourName"Affiliate Email account:$ git config--global user.email "Youremail"Create a new folder:$ mkdir Show current directory:$ pwdturn a directory into a git repository:$ git initAdd File to warehouse:$ git add submit the fi
Git command learning notes Git initialize git config command. The Git configuration file adopts the INI file format, git config is used to read and change the content of the INI configu
I. Check git
Check whether git is installed on the local machine before using git. By default, git is installed on Mac.
1. Open the terminal and enter the command. If git is installed, the version number is displayed.
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.