skills

Introduction 1. git add multiple format files

1  before git commit changes to add and then commit, if I went to a local file with git clone remote server, and then if I modify a few files to be submitted, one by one as I have:
 2  
3  $ git add a.txt
 4  $ the Add b.txt Git
 . 5  $ Git the Add C.txt 
. 7  
. 8  and
 . 9 $ Git the commit - m "the commit"
 10  
. 11  so submit it. What if I once changed a lot of documents, add this one is not exhausted.
12 is  
13 is  in fact, only one command can add all modified files:
 14  
15  $ Git add.
 16  
. 17   
18 is  behind the add, all matching documents.
. 19   
20 is   
21 is  Git the init
 22 is  Git the Add README.md
 23 is Git the commit -m " First the commit " 
24 git remote add origin [email protected]:mlh1421/baidu-mission.git
25 git push -u origin master

 2. The issue of Git Each entry will need to enter a user name and password solutions

Before using git when every time you need to enter a password, enter okay once or twice, each time input really can not wait to hit the computer, I am sure you are subject to a small partner and I had the same problem, and today we are concerned that this problem:

First, if we git clone download code when the connection is https: // rather than the form git @ git (ssh), and when we operate git pull / push to the remote, always prompt us to enter the account number and password to successful operation, frequent input account number and password will be difficult, particularly trouble.

Solution:

git bash into your project directory, enter:

git config --global credential.helper store

Then you will generate a text in your local, top recording your account number and password. Of course, you can not care about these.

Then you use the above command Once configured, once again operating git pull, then it will prompt you to enter the account password, after this time will not need to enter the password again. 

Guess you like

Origin www.cnblogs.com/jobgeo/p/11583621.html