Our company decided to move to Stash this week from github. We created all bare repos in stash for the ones in github.
Everything was pushed fine to stash after following the procedure mentioned in the docs here: https://confluence.atlassian.com/display/STASH/Importing+code+from+an+existing+project#Importingcodefromanexistingproject-ImportanexistingGitprojectintoStash
Except for one repo- the release team accidentally created a 'Readme' file on master branch inside the bare repo in stash.
So we removed that 'Readme' file , made a commit to that master in stash remote.
When we tried `git push --all stash` where stash is the name of the remote of stash repo, added to github repo cloned locally. (just like mentioned in the docs above ), it obviously didnt push to master as expected.
It says we need to update master with changes in remote. Use git pull.
Doing a git pull from github remote master branch, that has like 700 commits, it applies each patch, so there are conflicts after each patch.
Solving each conflict and then rebase --continue is really tiresome.
at this point im not sure what exactly to do now.
The situation can be summed up :
Any suggestions /help appreciated. ;((
I would do the merge manually to "throw away" the content of the README that you don't want. I believe that would look like this:
git fetch --all # Make sure you have up-to-date info git reset --hard origin/master # Start from what was on github git merge -s ours stash/master # Create a merge that ignores stash's changes git push stash master # Pushes up that merge commit
The drawback is that this extra commit will be in your history forever, but the good news is that nobody gets hurt. If you want to live a little bit more dangerously, you can simply overwrite the master using a forced push. There are some nasty consequences to trying to rewrite history like this, but if nobody else has tried to use the repository from stash yet, then you should be okay:
git fetch --all # Make sure you have up-to-date info git reset --hard origin/master # Start from what was on github git push -f stash master # Force push the master branch to stash
You should then restrict forced pushes to administrators, if you haven't already done so.
Bitbucket Pipelines helps me manage and automate a number of serverless deployments to AWS Lambda and this is how I do it. I'm building Node.js Lambda functions using node-lambda ...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs
We're bringing product updates and pro tips on teamwork to ten cities around the world.Save your spot