Posted by
sapan
on
- Get link
- Other Apps
I am writing these setup since many i want to create a git project out of existing files on my system. At that time I forgot what were the commands.
git init
git add -A
git remote add origin https://codezero@bitbucket.org/codezero/testProject.
git remote -v
git commit -m "added the files"
git push origin master
If you have initialize the repo with Readme me it will show error while pushing the files
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
So use the pull the changes from the repo
git pull origin master --allow-unrelated-histories
Now the push the files it will work.
Comments
Post a comment