Github Push local project to a remote repo

In this post we will upload a local project to a remote repository. invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Develo per/CommandLineTools/usr/bin/xcrun

  1. Create a new Java project named “test” under directory “F:\Github” or you can have your existing project here. E.g. You will have bin, src folder in “F:\Github\test” directory.
  2. In GitShell, change current directory to “test” and initialize a new Git repository here.
 cd F:\Github\test
 git init
  1. Check repository status and verify that it is properly initialized using git status.
  2. Add all untracked files to git repo using git add *. No output but if you do git status, you will see all untracked files have been moved to “changes to be committed” section.
  3. Create your first local commit on repository using git commit -m "Initial project commit".
  4. Remote repository: Go to your account on and create a new repository named test. Uncheck the checkbox to create ReadMe file for now. Copy the https path of remote repo, e.g.
  5. Switch back to Git shell and add the remote repo URL to your local git repo config file using: git remote add origin At this point, git shell might report fatal: remote origin already exists. It is a known issue and workaround is Stackoverflow: git push origin master doesn’t work.
  6. Now push your local git repository contents to server (or remote repository) using the following command. If you have properly configured remote url then this command should work fine. git push -u origin master Command details origin is the default name of the remote repository you created. By above command, git shell pushes (or commits) your local repository changes to the remote repository on the branch specified (wiz. master here).
  7. Additional note: In case while creating remote repository on, you added default to your repository then before git push, you first need to pull remote repository. git pull origin master Then your local changes will be merged automatically when you will push git push -u origin master
  8. Done.Check your remote repository, it should have your latest changes.