- Open the Command Prompt (Windows)/Terminal (Linux)
- Go to folder location
- Type the following commands:
git init
git add -A .
git remote add origin {url}
git fetch
git pull {url} master
git commit -m "{message}"
git push -u origin master
{message} is any message that you want to identify the commit
Example:
I want to connect the c:\workspace\luizcgjr to the http://github.com/blogger/luizcgjr repository
- Open the Command Prompt (Windows)
- Type
cd "c:\workspace\luizcgjr"
git remote add origin http://github.com/blogger/luizcgjr
git pull http://github.com/blogger/luizcgjr master
git push -u origin master
git init
git add -A .
git fetch
git commit -m "Added luizcgjr project to the repository"