- Create a Repository on GitHub.com
- Copy the link shown below
- Navigate to the folder in which you whish to create the repository
- Enter the command
git init
This initializes the local repository on YOUR COMPUTER . - Enter the command
git add remote origin <github-url>
(This is hte command we copied from the website) This will set the upstream of your local repository connecting it to the online repository. - Enter the command
git add -A
This tracks all the files inside of the added and deleted files inside of the local repository. - Enter the command
git commit -m '<message>'
This commits the current changes to your local repository. - Enter the command
git push origin master
This pushes your local repository to your online repository.
git add -A
This tracks all the files inside of the added and deleted files inside of the local repository.git commit -m '<message>'
This commits the current changes to your local repository.git push origin master
This pushes your local repository to your online repository.
- 1. Fix: Use `git pull origin master` instead.
-
-
Navigate to the child git directory (to find it check folders and see if you can use the command
cd .git
) -
Use the command
rm -r .git -f
to un-initialize the inner repository -
Add, Commit, Push as usual
-
-
git pull origin master
- Fix any merges if they appear
git push origin master
-
git reset --hard
git pull origin master