bzr: ERROR: Branch "file:///C:/FolderName/BranchName/" appears to be bound to itself. Please use `bzr unbind` to fix - explorer

Unable to use > bzr commit command in the bazaar explorer as this error occurs ... bzr: ERROR: Branch "file:///C:/FolderName/BranchName/" appears to be bound to itself. Please use `bzr unbind` to fix. Tried using bzr unbind C:/FolderName/BranchName/ and bzr bind C:/FolderName/BranchName/ . Still the above error occurs.
Thanks In advance.

What you apparently did was to use bzr bind by accident, which converted the branch to a checkout (also known as a "bound branch"). Checkouts/bound branches are used for centralized, CVS/SVN/Perforce-style version control, making it so that every commit is first applied to the master branch that the checkout is bound to.
In your case, the checkout is recursively bound to itself rather than a separate upstream branch, and Bazaar doesn't know what to do with that situation.
As the error message suggests, you can use bzr unbind to turn the checkout back into a regular branch again.
You can also use bzr config to check whether a branch is bound, and if so, to what upstream branch. A bound branch will have bound=True set and bound_location to the upstream branch.

Related

fatal : refusing to merge unrelated histories in git bash

"refusing to merge unrelated histories" message is showing in git bash when I try to merge two branch. In my project there are two branch respectively main and development. I have made some changes in development branch and want to merge with main branch but git showing this error message.
I do not tried anything actually I do not know the reason of this type error.

Is it possible to invalidate build cache on a given branch?

I'm using Gitlab CI on one of my projects and I face the following problem :
My master build fails since a lot of time...
I push a new branch built from the master (no new commits) and push it, the build works.
I think that it's related to build cache because the codebase is strictly the same... The latest valid build cache may make the current code base failed...
Is there a way to clean the build cache on a specific branch ? In my case the master ? From the API ?
Finally, the Gitlab Team gave me the solution on Twitter : https://twitter.com/gitlab/status/832674380790394880
Since my repository is hosted on gitlab.com, I can't remove the cache by myself. But on the .gitlab-ci.yml file documentation, it's explained that we can use a cache:key entry.
This cache:key is used to determine how the cache entry is named so I can change the default value to start on a blank cache 😊.
Below a sample of my .gitlab-ci.yml file :
my-asset-build:
cache:
key: "$CI_COMMIT_REF_NAME-assets"
With that configuration, my cache is related to the current ref (so a build on the same ref will use the cache) with a suffix !
Thanks to the Gitlab Team for their quick answer on Twitter !
If you have trouble with the variable name, maybe you need to check this page : https://docs.gitlab.com/ce/ci/variables/README.html#9-0-renaming
Also, since Gitlab 10.4, we have a "Clear runner cache" button in the pipeline list. Clicking on that button will have the same effect than changing variable name without polluting commit history.

How do I delete already merged local Git branches with TortoiseGit?

I would like to find solution for problem very well described here - in short, this problem can be solved with git branch -d $(git branch --merged) when commandline used - question is, is there possibility to do the same in TortoiseGit?
As of version 2.3 TortoiseGit only helps you for automatically cleaning up remote tracking branches.
You can do this automatically when you use the Pull/Fetch-dialog an check "Prune". Then all remote-tracking references which are not there on the remote are automatically removed. On Sync dialog select "Clean up stale remote branches" in the pull/fetch menu button.
Starting with version 2.3.2 you can open the Browse References dialog and filter for merged/unmerged branches. Using that filter you, then, can delete unneeded branches/tags.

Tooltwist Designer Repository Sync is failing

When I sync from the ToolTwist Designer, I select the files I wish to publish, but I get an error when I press OK, saying that the sync failed and to look in the server log file.
If I try again, the files I selected are no longer in the list, but if I check Git I can see they are not pushed to the repository.
In the log file I see that the push failed, and if I go to the webdesign directory and test the push command I get the same error:
$ git push --dry-run
To git#github.com:MyRepository/design-project.git
! [rejected] master -> master (non-fast-forward)
I'm using the 'design' branch, so I'm not sure why an error is occurring on the 'master' branch.
In normal circumstances the Designer only uses a single git branch, normally named 'design'. The error message above indicates a conflict on the master branch.
It appears that changes have been committed to the master branch on the local machine but not pushed, whilst elsewhere changes have been committed to the master branch and have been pushed onto the remote repo.
To clear this conflict you'll need to checkout the master branch and do a pull to merge in the changes on the remote, and then the next push will work. Don't forget to change back to the design branch when you're finished.
[stop the Designer]
$ git checkout master
$ git pull
[resolve any conflicts]
$ git push origin master
$ git checkout design
[start the Designer]
By default git tries to push commits on all branches. In this case, you might find that the conflict on the master branch is preventing your web design changes on the design branch from being committed. To prevent this from happening, you can configure git's default behaviour to only push the current branch.
$ git config push.default current
You might also want to investigate why the master branch is being changed (and in two locations).

bazaar bind branches

In my project , i have local branch for working and branch on network drive
i did "bind branch" between local one and network one
My idea is to use the bind option for auto backup of each local commit.
After i commit files in the local branch , i receive a message in network branch
" Working tree is out of date, please run 'bzr update'."
my question is :
Log on network branch will show the updated tree . Does the files are updated ? or i must do "update" ?
automirror plugin will help me for this scenario?
thanks
Binding a local branch to a remote branch means that commits to the local branch will automatically push that commit to the remote branch. If the remote branch and the local branch are not in sync, the commit will fail and neither the local or remote branch will be affected and your changes will still be sitting in your working tree. To get your local branch in sync with the remote branch, use bzr update.
If your network branch has a working tree, then the working tree is not automatically updated when commits are pushed from the local branch into the network branch. The network branch's working tree has to be updated with bzr update or plugins like automirror or push-and-update.
Unless you actually need the working tree in the network branch, I would recommend that you reconfigure the branch to be tree-less using bzr reconfigure --branch. If you have a shared repository that the network branch belongs to, you will also need to use bzr reconfigure --with-no-trees on the repository to stop it creating trees on new branches.
The 'bind branch' feature will succeed only if your local and network branches are up-to-date.
So the commit failed as there is a difference between these 2 working copies.