youngmon/atlassian-qna huggingface dataset:
Archiving Repositories
Asked by Socko-71:

*We will be migrating from Bitbucket Server to Bitbucket Cloud soon and have about a hundred repositories that we would like to archive. We are trying to identify the recommended method of storing and managing these archives.*

*Ideally: a) the archived source code (most recent commit) would still be readable and b) the history/branches would be preserved so that it could be imported into Bitbucket Cloud if necessary.*

*We have looked into keeping the archived repositories in Bitbucket Server as well as cloning the archived repositories to an internal shared drive. Are there any other possible solutions? What is the typical way this problem is solved?*


Answers:
author: dam0
body: Gathering Interest - <https://jira.atlassian.com/browse/BCLOUD-18018>


Tags: bitbucket-server

migration-customer-care

server
Can we clone from source tree to stash ?
Asked by Jyoti:

I am new at source tree.. we can clone repository from stash but can we clone from source tree to stash or not ?


Answers:
author: Tim Crall
body: Stash is where you would store your remote repo, while SourceTree is a GUI frontend for the git command line, meaning it's where you manipulate your local repo.  

Therefore, you can clone a repo from Stash to SourceTree - this really just means using SourceTree as the client with which you clone a repo from Stash to your local computer. Then you make changes locally and commit them. Then you can use SourceTree to **push** the new repos back to the remote repo. You do not use the clone command to send data from the local computer to the remote.


author: Seth
body: I don't use stash myself, but the basic idea here is going to be as follows:

1. Create an empty repository in Stash
2. Add the empty Stash repository to your existing local repository as a new remote
3. Push everything to your new remote
how to code with sourcetree
Asked by brightlivingstone:

Hello,

Im new to source tree. How to connect my sourcetree with my codes in local machine?


Answers:
author: Johannes Kilian
body: Mainly Sourcetree is a GUI for command-line git. You should be familiar with the concepts of git (or mercurial) when using sourcetree ...

If your sourcecode is not git controlled yet - you should at least create a local sourcecoderepository and store your code within it .... (Keywords: "git init", "git add", "git commit")

If your Sourcecode is already git controlled, you have to add your repository to sourcetree (Toolbar "Clone/New" -\> Tab "Add working copy") and you can work with your sourcecode within Sourcetree afterwards ...
On initial clone of git repository SourceTree shows pending files. Pending files are impossible to discard
Asked by Jamie Mccarter:

Using SourceTree on Mac I just cloned a repository to a Samba mounted Linux drive. Immediately SourceTree showed a file as having pending changes. SourceTree isn't suggesting these are EOL changes, but actual edits introducing additional code. I attempted to discard the file, but it simply never disappeared from showing as pending in SourceTree.

On the Linux machine, git from the shell showed a different git status. 'git status' showed the file SourceTree thinks had a few minor changes as having been 'deleted'. git status also showed several other files as having 'typechange'. Performing a 'git reset --hard' within Linux reset it so that 'git status' reports back "Your branch is up-to-date... nothing to commit, working directory clean".

However, back in SourceTree things have now gotten worse. Now SourceTree is reporting the original report of a changed file, plus a tonne of files as being untracked, some deleted and a few more as also having changed.

I deleted the entire repository and did a fresh clone and SourceTree ended up right back where I started - incorrectly reporting the status of the repository.


Answers:
author: Jamie Mccarter
body: I should add that two other repositories on the same Samba shared drive don't exhibit this problem. It seems particular to this one repository.


author: Seth
body: Also, git doesn't work well over network-shared storage.

<http://superuser.com/questions/91113/how-do-i-access-a-git-repository-on-a-samba-share>


author: Tim Crall
body: When I've seen behavior like this, it's because there have been files present in the source repo whose names differed only by case (i.e. foo.bar and FOO.BAR exist in the same directory). By default, Macs will not allow file names to differ only by case (and this behavior is also standard on Windows computers). Therefore when the clone operation occurs, only one or the other of the files will get copied onto the Mac. But git knows that both files are supposed to be there. It may show one as deleted or it may show that the contents of one have changed (to the other).  

The best solution is to not have files whose names differ only by case in your repo. This will give you the best compatibility when people clone to workstations. It's also possible to put your Mac into a mode where it will allow files that differ only by case (the same way linux will) - you can google for that, I don't know the steps off the top of my head but I know it can be done. But then you'd still have this issue if you had a developer clone onto a Windows PC, so I think it's best to just fix the filenames on your remote repo. You'll have to use a unix workstation that you can clone the repo to in order to fix the names.   

This is all assuming that I'm right about the source of your problem - but I bet I am.   

Windows machines also have restrictions on files ending in a period or with certain special non alphanumeric characters in them, by the way, so it's best to avoid these also for maximum workstation compatibility.
i cant clone a repository!!.. error index-pack died of signal 15 fatal index-pack failed .... what can i do???
Asked by sayab perez:

i cant clone a repository!!.. error index-pack died of signal 15 fatal index-pack failed .... what can i do???


Answers:
author: mayankcool786
body: Even I am facing the same issue. Has anyone found any solution to this?


author: Seth
body: <http://stackoverflow.com/questions/12337901/whats-wrong-with-git-clone-index-pack-died-of-signal-99-error>
I am unable to see the branch i am trying to commit to
Asked by Nishita Movva:

Hi,

I have had this issue before and the same again today. As I am trying to commit the changes made, I am not able to see the branch name by the commit.

Push changes immediately to to - \<typically you should be able to see the branch you are on but it is empty for me\>.

While we are at it, I have created a branch in my Bitbucket using git command but it is not making a difference. Please help me here. Thanks in advance!  
[](https://community.atlassian.com/t5/Sourcetree-questions/I-am-unable-to-see-the-branch-i-am-trying-to-commit-to/qaq-p/8148?attachment-id=2857){#link_1169afb7fe6ad6}  
[](/tnckb94959/attachments/tnckb94959/sourcetree-questions/185/1/image2016-1-25%2012%3A56%3A25.png){#display_1169afb7fe6ad6_0}  
[](https://community.atlassian.com/t5/Sourcetree-questions/I-am-unable-to-see-the-branch-i-am-trying-to-commit-to/qaq-p/8148?attachment-id=2858){#link_1169afb7fe6ad6_0}  
[](/tnckb94959/attachments/tnckb94959/sourcetree-questions/185/2/image2016-1-25%2012%3A52%3A53.png){#display_1169afb7fe6ad6_2}  
[](https://community.atlassian.com/t5/Sourcetree-questions/I-am-unable-to-see-the-branch-i-am-trying-to-commit-to/qaq-p/8148?attachment-id=2859){#link_1169afb7fe6ad6_1}  
[](/tnckb94959/attachments/tnckb94959/sourcetree-questions/185/3/image2016-1-25%2012%3A54%3A15.png){#display_1169afb7fe6ad6_4}


Answers:
author: Tim Crall
body: I'm not able to recreate the situation you describe, but it sounds like it was because the local branch was not set to track a remote branch, which is what you rectified with that git command.

When I create a new local branch, it seems like it's automatically assuming I want to push it to a similarly named remote branch, even if that remote branch doesn't exist, but that may be a version dependent behavior.

Your other option would probably be to just commit it and then go to the Push screen to push, because that screen lays out your branch options a little more fully.

comments: author: Nishita Movva
body: Tim, this has been the case lately, so maybe you are right there when you said it could be a version dependent behavior.

Appreciate you taking your time and walking through the options. Thanks again!


author: Nishita Movva
body: Thanks Tim for your response. Initially, I was not able to see the branch i was on. But now I do, as shown in the image below. I git bashed it by using the following command :

git branch -u origin/APOLLO28

I wanted to know if there is another or a better way to overcome this issue in the future.

Many Thanks.

image2016-1-25 12:56:25.png


author: Tim Crall
body: Can you include some screenshots to illustrate the problem you're having?
How to select files and sort files at the working copy
Asked by MinKu_Yeo:

ttt.png

Hi, I'm a beginner using SourceTree.

I have two questions.

1) Like the picture above, I selected multiple files (suppose 20 files) at the directory.

How can I upload those selected 20 files at the staging area, by not clicking the checkbox 20 times?

2) My directory is mixed up with files.

For instance, this directory has .md, .png, .h, and .c files in it.

However, I want to see or sort only the .h and .c files at the unstaged files sections.

How can I do it?

* Best Regards\~

[](https://community.atlassian.com/t5/Sourcetree-questions/How-to-select-files-and-sort-files-at-the-working-copy/qaq-p/255447?attachment-id=4078){#link_11736bce1ea09e}  
[](/tnckb94959/attachments/tnckb94959/sourcetree-questions/7512/1/ttt.png){#display_11736bce1ea09e_0}


Answers:
author: Tim Crall
body: 1) If you go into "split view staging" mode, you can select multiple files (control-click or command-click or shift-click) and drag them to the staged area.

Screen Shot 2016-01-25 at 9.33.54 AM.png

Screen Shot 2016-01-25 at 9.34.05 AM.png

2) If you'll never want to see the other extensions (and they haven't been added to the repo), you can add them to your .gitignore list (or right-click in SourceTree and select "ignore" which will do that for you).

You could filter a list temporarily using the search functionality (upper right) - but I don't see a way to search for two patterns at the same time  
[](https://community.atlassian.com/t5/Sourcetree-questions/How-to-select-files-and-sort-files-at-the-working-copy/qaq-p/255447?attachment-id=7911){#link_11736bd2cd8815}  
[](/tnckb94959/attachments/tnckb94959/sourcetree-questions/7513/1/Screen%20Shot%202016-01-25%20at%209.33.54%20AM.png){#display_11736bd2cd8815_0}  
[](https://community.atlassian.com/t5/Sourcetree-questions/How-to-select-files-and-sort-files-at-the-working-copy/qaq-p/255447?attachment-id=7912){#link_11736bd2cd8815_0}  
[](/tnckb94959/attachments/tnckb94959/sourcetree-questions/7513/2/Screen%20Shot%202016-01-25%20at%209.34.05%20AM.png){#display_11736bd2cd8815_2}

comments: author: MinKu_Yeo
body: Thanks for your answer.

I use SourceTree 1.7.0.32509 at Windows 10 (32 bit) with Git 2.7.0.

The ignore part was fine.

After changing to split view staging, however, I selected a folder that has .c and .h files and

it shown an error. Unfortunately, I didn't write down the error.

I thought it wasn't a big deal so I just closed the error message.

After closing and rerunning SorceTree, it became frozen (grey window showing not responding).

I removed SorceTree and installed it again, but it kept freezes.

This is kind of out of topic from my original question but can you give me some help?


author: Tim Crall
body: I'm afraid I don't have any insight into that one. You can try reposting it here as a new question to get more eyes on it.
SourceTree: How to fix this discrepancy between dev and master branch?
Asked by Jirong Hu:

The user has finished a pull request and merged the changes from dev-nickw to master. Now from the screenshot master has 1 commit (that pull request) ahead of dev-nickw.

1. Is this all right? Do I need to and what's the proper way to sych these two branches? The user wants to reuse the dev-nickw branch.
2. Also what's the different between delete that dev-nickw branch and reuse it?

git.PNG  
[](https://community.atlassian.com/t5/Sourcetree-questions/SourceTree-How-to-fix-this-discrepancy-between-dev-and-master/qaq-p/83176?attachment-id=12951){#link_1169b006629e2f}  
[](/tnckb94959/attachments/tnckb94959/sourcetree-questions/2314/1/git.PNG){#display_1169b006629e2f_0}


Answers:
author: Jobin Kuruvilla [Adaptavist]
body: That is correct. The merge is treated as a commit and that is the one commit shown in master ahead of dev. Code should be the same.

Not sure what you meant in the second question. You don't need to delete the dev branch and recreate it every time. You can just reuse the current branch and continue to use pull requests to send the code to master.


author: Seth
body: As Jobin said, your current situation looks great.

With the specific commit set above, the branches should be actually in-sync (identical code). If there had been changes to master, your user could merge from master to dev-nickw. If he does that now, and allows it to be a fast-forward merge, Git will just move the branch reference to commit 210ae0f, which would clearly be in-sync.


author: Tim Crall
body: To answer the second question, there would be effectively no difference between continuing to use the branch vs. deleting it and creating a new branch off of develop. A branch is just a pointer, so deleting it and then recreating it at (effectively) the same point won't make any difference.

Also, just to add to everyone else's answer, had there been any commits on the master branch after dev-nickw branched off, then the fact that his dev branch was behind would have had actual meaning, in which case you would want to either merge the master back into dev-nickw, rebase dev-nickw off of master, or (my recommendation) delete dev-nickw and create a new branch, named after the feature you're working on rather than the developer doing the work.
Does SourceTree support Windows 10 Virtual Desktops?
Asked by Matt Honeycutt:

I use the crap out of Windows 10's virtual desktop feature. I may be working on a couple of projects at a time, and I typically put each on its own virtual desktop. With Git Extensions, I can have a separate copy of the app running on each virtual desktop, each pointed at the repo I'm using in that context.

It doesn't seem that SourceTree supports that. When I try to launch SourceTree from a different virtual desktop than it is already running on, it just brings me back to the already-running instance. That's not what I want. I want it to spin up a new copy. Any suggestions?


Answers:
author: Seth
body: Looks like not. You can file a feature request at jira.atlassian.com.


Tags: windows
Can I run a report showing all the files I have changed in the repository?
Asked by Barbara Schramm:


Answers:
author: Seth
body: SourceTree doesn't have much in the way of reporting. You'll probably need to construct some commands that use the git command line interface to query the data you need, and then other commands to organize/format it.

There are probably some users on stackoverflow or a git mailing list that may be able to help.

Here is something like what I'm talking about, but it is for SVN, not Git: <http://www.commandlinefu.com/commands/view/8010/list-svn-commits-by-user-for-a-date-range>


author: Barbara Schramm
body: Thanks for your response. I need a report that shows all commits for a date range, per username. But I am also interested in understanding the reporting capabilities in general.


author: Seth
body: The question is unclear. Do you mean all files you have changed in the repository ever? Or for a particular commit? Or maybe a commit range or time range? Or maybe since the last pull? Or maybe what isn't committed?

If you were able to ask Git what files have been changed since the creation of the repository, the answer is "all of them".
How to stop from suggesting "Push to Repository: Subversion"
Asked by Seth Willits:

In this one project I created a git rep by importing from an svn repo so it would have all of the commit history from svn. The svn repo **no longer exists anywhere** but whenever I try to push changes from this local working copy SourceTree always suggests "Subversion" as an option of where to push it to. And worse, it's always the default selected choice, instead of "origin".

What's the cause of this? How do I stop it?


Answers:
author: Seth
body: In "Repository Settings..." you can delete remotes.

comments: author: Seth Willits
body: Thanks, though the only remote listed is my git origin. No svn remote.


Tags: git

svn
SourceTree is diff-ing unchanged hunks
Asked by andrew:

Screen Shot 2016-01-20 at 3.06.41 PM.png

I didn't change this, it is unchanged.

It also does this for whitespace in the middle of the file.

Is there some sort of setting I'm missing for super-aggressive diff's? is this a bug? Am I somehow bad at Git?

[](https://community.atlassian.com/t5/Sourcetree-questions/SourceTree-is-diff-ing-unchanged-hunks/qaq-p/287896?attachment-id=3444){#link_11736c431d6491}  
[](/tnckb94959/attachments/tnckb94959/sourcetree-questions/8936/1/Screen%20Shot%202016-01-20%20at%203.06.41%20PM.png){#display_11736c431d6491_0}


Answers:
author: Seth
body: The particular change being displayed there (highlighted badly) is whether or not there is a blank line at the end of the file. As Tim said, it shouldn't display if you ignore whitespace.


author: Tim Crall
body: You can set it to ignore whitespace differences by clicking on the little gear to the right and selecting "Ignore whitespace"

Screen Shot 2016-01-20 at 1.24.13 PM.png  
[](https://community.atlassian.com/t5/Sourcetree-questions/SourceTree-is-diff-ing-unchanged-hunks/qaq-p/287896?attachment-id=11018){#link_11736c4d82bd21}  
[](/tnckb94959/attachments/tnckb94959/sourcetree-questions/8937/1/Screen%20Shot%202016-01-20%20at%201.24.13%20PM.png){#display_11736c4d82bd21_0}


Tags: html

mac
env: node: No such file or directory
Asked by Nerijus Gudas:

Every time I try to commit, pull or push SourceTree app prompts this weird error.   

It started happening when I have changed my default node version on my NVM (node version manager) on my Mac.   
Screen Shot 2016-01-20 at 10.04.01.png

Git works just fine from the command line. So it is only on SourceTree  
[](https://community.atlassian.com/t5/Sourcetree-questions/env-node-No-such-file-or-directory/qaq-p/66088?attachment-id=1898){#link_1169b05c8e6534}  
[](/tnckb94959/attachments/tnckb94959/sourcetree-questions/1873/1/Screen%20Shot%202016-01-20%20at%2010.04.01.png){#display_1169b05c8e6534_0}


Answers:
author: Pulkit Singhal
body: The right answer is available here:

```
https://answers.atlassian.com/questions/140339/answers/32030983
```

comments: author: Shane Faulkner
body: bad link


author: Vitaliy Makovyak
body: Run "/Applications/SourceTree.app/Contents/MacOS/Sourcetree" from terminal instead of running launcher. It works for me. Found the solution on stack overflow


author: Nerijus Gudas
body: Hi yes. @Dhairya Dhairya, it was my git hooks - i had custom git hooks that did check lint before allowing commit. Source tree couldn't handle custom feedback.  

I removed all custom git hooks to fix this. Which was technically not solution, since I had to check linting manually. Source tree actually got to me.   

I switched to CLI git and started using "GitKreken" (pretty intersting ui).


author: Dhairya Dhairya
body: @Nerijus Gudas any luck to solve this? Currently, i am facing this problem too.


Tags: mac
How to update my SourceTree lincense,'Lincense To'?
Asked by Jun Chai:

I wan update my SourceTree lincense ,How to update my SourceTree lincense,'Lincense To'?


Answers:
author: Timothy
body: You can do it from the menu bars. Example in Mac:

Screen Shot 2016-01-18 at 8.39.11 AM.png

[](https://community.atlassian.com/t5/Sourcetree-questions/How-to-update-my-SourceTree-lincense-Lincense-To/qaq-p/405024?attachment-id=58){#link_11736c81ce313c}  
[](/tnckb94959/attachments/tnckb94959/sourcetree-questions/12119/1/Screen%20Shot%202016-01-18%20at%208.39.11%20AM.png){#display_11736c81ce313c_0}

comments: author: Vanson
body: Thank you for your answer,but i don't want to register an new lincense.I just want to modify the display name.


author: Accounting Go2Group
body: You probably won't be able to do that as the display name of the license is in the license itself.
Recommendations for fixing conflicts in SourceTree
Asked by Larry Q:

I'm a big of SourceTree and use it all the time. One sticking point for me is that when I merge or rebase and encounter conflicts, I wind up opening the files in a text editor and manually editing them, looking for the \<\<\<\<\< and \>\>\>\>\> bits and hoping I got everything.

Is it possible in SourceTree to right-click a conflicted file and open a merge tool, or take an equivalent step? And can I set my choice of merge tool in the SourceTree interface in some way?


Answers:
author: Seth
body: Yes and yes.

If you right-click a conflicted file, there is a "Resolve Conflicts" pop-out menu, and one of the options is "Launch External Merge Tool" - almost exactly what you asked.

To choose a merge tool, go to Options \> Diff. There are some pre-configured options (you have to install the referenced programs), or you can manually enter the command for some other diff/merge tool that you prefer.

comments: author: Larry Q
body: Beautiful, thanks Seth.
sourcetree authentication
Asked by Jingyun Chen:

I am using sourcetree 1.6.20 on windows 7.

Git terminal could push the code to remote host with password prompt.

when I push the code from sourcetree, it failed with "fatal: Could not read from remote repository."

Sourcetree never prompt for password.

I deleted saved password from tools\>option\>authentication. How do I put it back?

I didn't put the password in my URL ssh://user@111.1.1.1


Answers:
author: rrudnicki
body: Hello,

Can you confirm if your ssh-agent is running?

Cheers,

Renato

comments: author: Jingyun Chen
body: it is running with the right private key.


Tags: git