Examples of sudo commands and sudo command examples
Sudo: authorize normal users to execute a command and run it as a specified user.
Configure sudu, enter the command mongodo, find the target line, and edit the configuration file under the target line.
, The first co
Git common command notes git undo add operation before submission problem: when using git, before not added. use gitadd before the ignore file. add all files to the database, and accidentally add some files that do not need to be added to the version database. Not submitted yet...
] that has been committed delete a file git commit-a commit all changes to the current repos git add [file name] Add a file to git indexgit commit-v When you use the-v argument you can see the difference of commit git commit-M"This is the message describing the commit"Add commit information
Objective
Here does not introduce git, table a see the command line is afraid, commonly used commands are these, basically meet more than 99% of the project needs, very practical.
Body
First, Common git command
1.1 Git clone
From remote library clone code to local, d
Git is a good thing, just windows under the git because there is a graphical interface, may be a little easier to use, but to tell the truth, it is a little more useful, as for Linux, the pure command line, for the veteran, may find it very easy, but for the novice to the Linux platform, may not be so easy, below, is that I use
git clone: This is a simpler way of initializing, and when you already have a remote git repository, you just need to clone a copy locally, like ' Git clone git://github.com/someone/some_ Project.git some_project ' command is to fully clone the remote repository of the URL a
GIT basic Operations Command, temporarily only the most basic operation, excerpt from the first line of code.
install Ubuntu system to open the Shell interface, enter: sudo apt-get install git-core windows system to download the website. URL: http://msysgit.github.io/Initial initial configuration user name, mailbox:
git
chronological order, but are sorted alphabeticallyUse git show $ git show P1.0Commit 99171bde2eddbf67b8860024504bc14556de2978 Author:hkui764432054@qq .com>Date:fri Dec - the: A: the .+0800Modify Ignore configuration filediff--git A/.gitignore b/. Gitignore index e69de29.. Ef752b0100644---A/. Gitignore+ + + b. Gitignore @@-0,0+1 @@ +conf.php \ No newline at
Git common command notes git undo add operation before submission problem: when using git, before not added. use git add before the ignore file. add all files to the database, and accidentally add some files that do not need to be added to the version database. The HEAD vers
mkdir learngit Creating a file directoryCD Learngit into the cataloguePWD View current directoryCat Readme.txt Viewing file contentsGIT init initializationgit config user.name "Suxinglee"git config user.email "[email protected]"git add "Readme.txt" adds a file to the library two ways to add: a library that originally existed in this file, two to create a file themselves and then executeGit commit-m "XXX"The
To create a git repository in the current directory:#cd Learngit#git InitTo add a file to git:#git Add Readme.txtSubmit:#git commit-m "Worte a Readme file."To view the current status of Git:#g
Aliases are used to help you define your own git commands. For example, you can definegit aTo rungit add --all.
To add an alias, open~/.gitconfigFile and add the following content:
[alias] co = checkout cm = commit p = push # Show verbose output about tags, branches or remotes tags = tag -l branches = branch -a remotes = remote -v
... Or type:
$ git config --global alias.new_alias git_function
For ex
When I first started to learn git, I never understood why to have git add this command, feel git submitted to troubleI need
git add xxx.mdgit commit-m "Add xxx"Git push Origin MasterTo submit a file to the far end, I miss the SVN
Read the snow-capped teacher git tutorial today to do some summaryGit Use commandsInitializing the WarehouseGit initSet User name passwordgit config--global user.name "Your name"git config--global user.email "[Email protected]"Add files to a git repository to add multiple files repeatedlygit add Submit FileGit commit-m "Remarks"Show Change status in colorgit conf
Git GUI and Command line
Git manages code versions in two ways: GUI and Command line
GUI: There are platform restrictions. Currently, only Windows systems are supported. Linux (Unix) adopts the command line mode, and the number of Display files is limited each time the graph
After you install GIT, first configure global to be globally public only for first-time configuration.$ git config --global user.name "Your Name" $ git config --global user.email "[emailprotected]"Create an empty directory, and thenGit init Initializes a hidden filegit add txt.txt adding repositories
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
How to Implement and work with the merge command in Git
Imagine the following situation: there are two branches in the code library, and each branch has been modified. Finally, you want to merge one of them into another branch.
What is the process of merging? Does Git operate on each branch according to its historical data in serialization, or does it only merge
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.