I am using postman and I have 2 workspace master and personal workspace. I am forking the collection in the master into the workspace in the personal workspace. Then accidentally there is a wrong merge from fork to master. how do I revert the merge in postman? is there any way because i am searching in https://learning.postman.com/docs/collaborating-in-postman i couldn't find anything about revert the merge
This feature is not available in free plans it seems you need to have Pro or Enterprise version
https://github.com/postmanlabs/postman-app-support/issues/6845
comment:
https://github.com/postmanlabs/postman-app-support/issues/6845#issuecomment-509352841
Related
Is it possible to close a pull request without merging it into the upstream branch?
I am using gitflow and so I want the developer who started the feature branch to finish the feature branch rather than reviewer to merge the feature branch.
Looks like this facility is available in github.
You can abandon the Pull Request, it will close it without merging:
Ok, So if you want to merge but not delete the feature branch, there is an option. Just uncheck the delete check box.
Now using gitflow, you can now finish the branch. Then git flow will delete the branch locally as well as remotely. And before deleting locally, it will merge changes from the feature branch to the develop locally.
We have a GitHub project (master), every member of the team have a Fork of the project into their own repository.
Once a developer fixed something he create a new branch inside his local forked repo and commit that into remote repository and after that they request a Pull Request so that change go into the master reposiroty.
We publish to production "manually" once a week but we have had issues in production because accidentaly developer had committed to their forked repository and other developer with higher privilegies accept the changes and merge that into master repo, then someone else publish to production and he didnt knew that those new changes didn't passed to QA process.
So, what I want is to create like a Production Repository, so when we have the code in master repo that we know is stable and working then create like a Production branch so if by mistake something is commited and merge into master repo then the code for production publish is not affected.
Any clue or best practice to do this?
Not sure I'm understanding the question correctly, but you can add as many remote repositories as you like. There is a section in the Pro Git book called Working with Remotes that discusses this thoroughly.
In my experience, separating development and production code is typically done with a branching model such as git-flow. You can create separate repositories to solve this problem if you like, but doing so is unnecessary. This is because if developer A submits a PR that's merged by developer B, then developer C will get a non-fast-forward error when they try to commit upstream. This is called a subversion-style workflow. Per the docs:
Git will not allow you to push if someone has pushed since the last time you fetched, so a centralized model where all developers push to the same server works just fine.
If commits to the upstream branch are not being fetched and merged appropriately before pushing, then someone has likely taken it upon themselves to rewrite history.
Your git workflow is good enough to take care of this issue.
First, to fix the issue:
Treat unintended code push as bug and fix it as you would fix any other bug. Best person to perform this activity would be the developer who pushed that code. Developer can just fix it in their fork and submit a pull request. Try not to add any other unrelated code with this pull request.
About Production Branch or Repo:
I don't think you need another Production Branch/Repo (you already have one). As it happened with your current PROD repo, accidental code push can make it to new Branch/Repo too.
Instead use tags/releases feature in GitHub. Whenever state of code in master repo is prod ready, tag it and use the tag for production publish.
We are using Gitlab (the gitlab.com free version). My colleague is creating merge requests and we are merging from one branch (development) into another (master). When my colleague merges into master the MR is shown as Merged. I am then running some tests on the merged branch (not done automatically through GL currently) and when happy with the merge I am wanting to close the merge request. However I do not have any option to close it - I do not have a close button and if I type /close in the comments it does not do anything.
Neither my colleague or myself are able to close the MRs. We both have Master status and have tried changing various MR project settings but to no avail.
PLease can anyone help?
In Gitlab, the merged status means the relevant commits have been merged and no action is needed.
A closed merge request is one that has been put aside or considered irrelevant. It is therefore not merged into the code base.
Therefore, you only merge MRs when you're happy with the changes and close them if you think the changes are not worthy of being integrated into the code base ever.
A typical workflow would be the following:
User A works on a new feature in a feature branch and pushes their work to that branch.
They can open a merge request to merge their feature branch into master.
User B pulls the feature branch, eventually rebasing it onto master, and runs the tests they want.
If User B is happy with the changes/new feature, they can merge the MR into master (or whatever branch you merge into)
The merge request will be shown as merged
Of course it's better if the tests run automatically in a CI.
With GitLab 12.2 (August 2019), you have new options which could help indicate the "closed" status of a merge request.
See "New push options for merge requests"
In GitLab 12.2, GitLab has been taught new push options to:
Set the branch to be removed when it is merged.
Change the merge request’s title.
Change the merge request’s description.
See issue and documentation
I have a repo on GitHub here.
I have pushed to this repo from two different machines, so now one machine is current and another has outdated code. Right now, I am on the machine with outdated code, and I want to pull in the master/HEAD/whatever from GitHub.
And then I get to stare at this:
I do not want to do something stupid like delete the project from Eclipse and then pull in all the code from GitHub.
Can someone please help me merge/synchronize the projects? This is as simple as it sounds.
Unfortunately, this is what happens when I click "Pull" on the above menu:
Would someone also explain what the difference is between Pull, Merge, Fetch and Synchronize?
eGit doesn't know, which remote branch you want to pull from.
If you create your local branch based on a remote tracking branch, then the key is generated automatically. Otherwise you have to create it yourself:
branch.master.merge=refs/heads/master
branch.master.remote=origin
where master stands for the branchname, in the key it's your local branch, in the value it's the branch in the remote repository. Place that in the repository-specific configuration file %repositorypath%\.git\config
As for the terms:
merge: join two or more development histories together
fetch: download objects and refs from another repository
pull: fetch from and merge with another repository or local branch
sync: allows you to compare 2 branches
In general, I urge you to read eGit user guide, where you can get even better understanding of Git and eGit. It can be found at http://wiki.eclipse.org/EGit/User_Guide
As of the latest version of Github for Windows (1.0.24), I began having issues merging and syncing repos. I have an enterprise github account.
Here is an example situation, I merge my develop branch into the master, but the commit does not display when viewing the master branch in GFW. Therefore the sync option is not available because GFW believes the code on the local repo and server are in sync.
When I look at the master branch source code, I see the the latest commits from the develop branch that were merged into it are there. GFW does not display any commits EXCEPT when you use the Manage branch option. There you can see the lastest commit is the in the master branch.
Something is out of whack, maybe its me!
Any thoughts?
Yep, I get the exact same thing from time to time - you're not crazy.
I wish they'd fix it though