This workflow means that you already have existing code locally and empty remote repository, so cloning that repository as a start of project is not a way.
In order to easy push of your local master to origin/master, that remote master should be empty. By empty I mean really empty - no readme, no licence, no gitignore - so generally no intial commit at all. If you made a mistake and create that repository with initial commit - you have a problem with intial combining local and remote repository e.g. first push command, because local and remote repositories have unrelated histories.
1 2 3 4 5 6 7 8 | > git push origin master To https://gitlab.com/something/utils.git ! [rejected] master -> master (non-fast-forward) error: failed to push some refs to 'https://gitlab.com/something/utils.git' 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 you should make git pull first. But it does not allow you to do that, because of that unrelated histories.
Actually there is a way out of that problem. You should pull the repository with additional parameter
and it will download your readme.md and other files from origin/master to your master and creates related history of that two repositories. So it you do that, you can now push your local repo to the remote normally and it will not say a thing.
And here is how you can add git version control to your project - just in case you forgot it (as I usually do)
If your git push fails as mine does in first box - make git pull with that --allow-unrelated-histories and afterwards git push.
Actually there is a way out of that problem. You should pull the repository with additional parameter
1 | git pull origin master --allow-unrelated-histories |
and it will download your readme.md and other files from origin/master to your master and creates related history of that two repositories. So it you do that, you can now push your local repo to the remote normally and it will not say a thing.
And here is how you can add git version control to your project - just in case you forgot it (as I usually do)
1 2 3 4 5 6 | git init git add . git commit -m 'First commit' git remote add origin <remote repository URL> git remote -v git push origin master |
If your git push fails as mine does in first box - make git pull with that --allow-unrelated-histories and afterwards git push.
A commercial credit report contains information about your company’s business structure, its financial performance, and financial history. A slight change in your CIR can impact your company credit score positively or negatively. If you think you’ve been trapped in a suspected fraud, you can report business credit defaulters on the CreditQ platform and can check your commercial credit report India. We begin the standard procedure of settling payment with your business credit defaulters.
ReplyDelete