We are using git for version control and right now we are getting a lot of warnings when trying to upload the most recent version. I am new to git and don’t have patience for the restrictions, is there any way to delete everything and upload the current version?
This is what I get now when trying to upload.
$ git push origin master
Username for 'https://code.google.com':
Password for 'https://<removed>@code.google.com':
To https://code.google.com/p/<removed>/
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to 'https://code.google.com/p/<removed>/'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Merge the remote changes (e.g. 'git pull')
hint: before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
1.) Delete everything in your repository folder
2.) run
git rm *to tell git to remove all files (check withgit statuswhether there are any unstaged files left)3.) do a
git commit -a -m "commitmessage"agit push origin masterto delete all files on the remote git server4.) check if you have an empty remote repository now
5.) copy all new files to the local repository folder
6.) run
git add *to tell git to add all new files (check withgit statuswhether there are any unstaged files left)7.) commit and push the new files
Now you should have the version on your remote git repository.