-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgit.md.save
More file actions
24 lines (21 loc) · 835 Bytes
/
git.md.save
File metadata and controls
24 lines (21 loc) · 835 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# Git repository instructions
Add a new repository in GitHub and then in the folder on your computer that you want to upload to GitHub run the following commands (changing my_username and my_project to your situation):
```git init
git add .
git commit -m "initial commit"
git remote add origin https://github.com/my_username/my_project.git
git push --set-upstream origin master
```
Notes
If this is your very first time setting up git on your local machine, then you need to add your username and email:
```
git config --global user.name "Bob"
git config --global user.email bob@example.com
```
In the future when you make changes you can simply do the following:
```
git add .
git commit -m "description of what I changed"
git push
```
https://stackoverflow.com/questions/51997057/upload-local-repository-to-github-com/66343493#66