I am not very experienced with Git but I think this is a TortoiseGit-specific version of: Git diff between current branch and master but not including unmerged master commits
When working in a feature branch, I would like to see:
all changes I made to a file since branching
all files I've changed in the branch
But specifically, how I can do this in TortoiseGit rather than on cmd-line?
Open the Log
Select both branches
To make this easier you can click on the "Branch selector" in the upper left
Select both branches there, on "OK" select "branchA branchB"
On the log you see now both branches, select both branches (the latest commit of each branch)
Open the contect menu and select "Compare"
Open Diff options and select "Use common ancestor"
Related
In my git repo origin, i used to have the branches called "test" and "master". I removed the branch "test" from origin. And pushed a new branch "TEST". Notice that I basically removed the "test" with all small case and added a branch with all caps "TEST".
I ran "git fetch --prune" on my local machine. And then removed the branch test ("git branch -D test"). So, in my local i now have TEST and master branches. And i only see these 2 branches when i run "git branch" using git bash.
But, the issue i am seeing here is that, tortoise git is still showing the "test" branch that i already removed from my origin and local. Please help me in getting rid of the "test" branch from tortoise git as well. This is important for me, as there are other team members that use only tortoise git and not git bash and they see the same issue. So, i should atleast solve this issue for them.
Go to the directory of a git repo. Right click in the directory and you will see this menu.
Click on Git pull. You will see the following dialogue.
As you can see above, the Remote branch dropdown still displays "test"
if we click on git push from the first screenshot, this dialogue will appear.
And the remote dropdown in this case displays only "test" and not "TEST". Because of this, when people push this way, it is resulting in creation of a new branch called "test" in the origin, which is not intended.
I know we can manually type "TEST" for the remote branch before pushing. But, it would be nice if the "test" goes away which will prevent people from accidentally pushing to the wrong branch "test".
Selective removal: Mousehover an entry and then press shift+del.
Removing all settings: Go to TortoiseGit settings -> Saved Data and hit the appropriate clear button (cf. https://tortoisegit.org/docs/tortoisegit/tgit-dug-settings.html#tgit-dug-settings-saved-data)
I'm using the standard xcode source control (version 9.3)
I just reopened my project and when I go to the Source Control Navigator:
It shows a long hex string at the top instead of the current branch name
None of the branches have '(current)' next to them
I have tried cleaning the project and also closing and re-opening.
Source Control->Commit brings up the standard commit interface with the option to leave a comment.
When I click on the very top row (with blue icon) I can see the new commits but they don't show in any of the branches.
What am I doing wrong?
This worked for me:
I clicked on the row with the long hex name. This brought up the version history for the current version.
I right-clicked the most recent change in the change history.
I clicked 'Branch from...' and created a new branch from that point.
For those wondering how something like this could have happened, it is caused when you checkout a commit rather than checkout a branch. Even if you checkout a commit inside the branch that is "current" (even the most recent commit), this will cause the branch to no longer have the "current" written next to it. So when you are sure that this previous commit that you have now checked out is the commit you want to work with, then you must do what Derek posted to do which is to "Branch from..." to make a temporary branch and then merge this temporary branch into the branch that this previous commit originally came from. And then you can delete the temporary branch. It is somewhat of a pain, but a good reason why Xcode does this is so that you are well aware that you are on a previous commit and that you should really make sure this previous commit is what you want your current branch to be at.
I must be missing something.
I am a git Newbie. I unintentionally created a Branch when I did a Switch/Checkout on a single file (reverting to a previous version).
I then tried to Merge that right branch. But files were in Conflict, so I cancelled.
Now, everytime I try Commit or Switch I get an error that "did not exit cleanly" but when I try to Commit I get the Conflicted Merge.
How can I cancel the request for the Merge?
You have two choices:
Go to the log dialog and perform a hard reset (on the latest revision of your branch)
Open the context menu in explorer and select "Abort merge" which basically does the same.
Both options will reset all files in the working tree and the index "back" to the latest version of your current branch.
Update: Starting with TortoiseGit 2.4.5 you can also select "git reset --merge" in the "Abort merge" dialog. This option resets the index and tries to restore the pre-merge state of the repository.
Simple (and probably dumb) question, but here goes:
I wanted to merge my Dev code to the QA\Main branch (where it belonged) but accidentally chose the QA branch (where there is no code.) Now the Resolve conflicts have a couple hundred "The item has been deleted in the target branch." How do I cancel the merge? Or do I resolve the conflict by taking the target version for all?
If you haven't checked in the merge, then just undo all of the pending changes.
From the pending changes window in Team Explorer select the root folder and right click, then choose undo.
If you have checked in the merge then you'll need to rollback the change.
From the root of the target branch in Source Control explorer, right click and select view history. Select the changeset that represents the merge and select "Rollback" or "Rollback Entire Changeset" Then check in the changes.
I can see how to create a branch, but I would like to remove one that I will never use. There doesn't seem to be such functionality in Xcode, so I tried in terminal doing
git branch -d BugFixes
but no luck.
You can delete git branches in Xcode. Choose Source Control > WorkingCopy > Configure WorkingCopy, where WorkingCopy is the name of your working copy, which is usually the name of your project. A sheet opens. Click the Branches button at the top of the sheet. Select a branch and click the minus button at the bottom to remove the branch. Note that Xcode does not let you remove the current branch.
Xcode 9 Update
Apple moved the user interface for branches to the source control navigator in Xcode 9.
To delete a branch, select it, right-click, and choose Delete. You cannot delete the current branch.
please try:
for local: git branch -D BugFixes
for remote: git push origin :BugFixes