当前位置:网站首页>How I use git to upload local code to GitHub is worth learning

How I use git to upload local code to GitHub is worth learning

2020-11-10 11:27:34 osc_47pscir3

background : Recently, a bidding system has been developed , How I use JSP Build an online bidding system on the Internet , To promote the paperless website , Process electronization , The development of Intelligent Management .

Use git Upload .

  First of all, you have to have git Tools and github account number , You don't have to prepare in advance . My local folder already has the database and source code , I operate directly in that folder .

Go into the folder . Right mouse button , open git -> Git Bash Here -> git init. After executing the command, create one in the directory .git Folder .

git init

Check the status

git status

 

git add + The file name to be added perhaps git add --all Add all the files , I am here

git add --all

This command will put all files in the current path , Add to the list of files to be uploaded . 

 

take add The file of commit To the warehouse , After adding , Finally submit it ,git commit -m “ Modification Description ”.-m The following is a description of this operation , Add a simple explanation of what you've modified or re uploaded , People will know what happened when they read it . Then again, git status Check the status , as follows , Added successfully :

git commit -m " Submit source code "

Go to github Create your own Repository, Click on Create repository, Step by step, you can go on , After successful creation, get the created warehouse https Address

Associate the local warehouse with github On , What I use here is https, You can also use ssh, Please refer to my last article for public key configuration :gitlab perhaps gitee Generate / add to SSH The public key solution

https://github.com/sunmenglei/sunmengleiwangshangzhaobiao/

 

Upload code to github Remote warehouse . After the execution , If there is no abnormality , Wait for the execution to finish and upload successfully , You may be asked to type Username and Password, You just type github The account number and password of

git push -u origin master

 

stay github Check the committed main branch ,ok Be accomplished , Refueling workers

 

版权声明
本文为[osc_47pscir3]所创,转载请带上原文链接,感谢