Pushing Changes to Github.com
Goal: By the end of this document, you'll have added a file to your repo and pushed the change to Github.com
Last updated
Goal: By the end of this document, you'll have added a file to your repo and pushed the change to Github.com
Last updated
Create a file called FirstFile.txt and put some text in it ( "Hello World" for example )
Save the file into your local repo ( Sites\UML\webDatabaseImplementation\ongoingWork
? )
Open your project in SourceTree and click on File Status. You should see your new file in the Unstaged Files section.
Stage your file by clicking on Stage All or click on in and choose Stage Selected.
Enter a commit message and commit it.
Click on the PUSH icon at the top of the page
IF YOU RUN IN TO SECURITY ISSUES CONTINUE ON
Go to Github.com and login.
Click on your Avatar in the upper right and choose SETTINGS
Click on Developer Settings in the left hand menu
Expand the Personal access tokens menu on the left and choose Tokens (classic)
At the top, click on Generate new token (choose classic again). You might be asked to authenticate again.
Give your Token a name (can be anything - general access
is perfectly fine)
Select the checkbox next to repo to select all items in the repo section.
Click on Generate Token
IMPORTANT: COPY THIS TOKEN TO A FILE AND KEEP IT SAFE. YOU CAN NOT ACCESS IT AGAIN AFTER YOU CLOSE THIS WINDOW AND WILL HAVE TO GENERATE A NEW TOKEN.
Back in your project in Source Tree, click on Settings in the upper right
Under the Remotes Tab, click on the row for orgin
then click Edit
In the URL / Path box, IN FRONT OF THE EXISTING URL, paste your token followed by an @ sign. The contents of this box will then be token@github.com/whatever/your/site/path/is.git
Click OK then OK to close all the windows.
Try to Push to Github again.
If you are still having issues, see your instructor.