My company insists on using Sourcetree and I am struggling to find out how to create groups and contain the branches in those groups, as the ORIGIN is getting messy as you can see here, the list is more than 3 times the items that are displayed in this screenshot. I tried looking for an option in the s/w itself and did research but I cannot find an option to do that.
Create a branch with a slash in it, e.g. folder/branch. SourceTree will automatically format these as folders.
Related
On github's main page there is a list of repositories on the left. I got on this list repo "alanxz/rabbitmq-c". It is not forked. I'm not a contributor. It simply sits there. I suppose that it was added when I filled an issue there, but it was closed and I have no longer use for this repository.
When I go to Setting -> Your repositories, it isn't there. When I go to Personal settings -> Repositories, it isn't there. I have no way to remove it, I can't leave (as I'm not a contributor) and I can't remove it (as it isn't forked). The following questions are similar but do not apply or are identical but lack answers:
GitHub: Remove a repository from "Your Repositories"? (similiar, but that's not it)
how to remove 'Repositories you contribute to' in github mainpage (seems like exactly same problem, but no answers)
Remove external github repository from https://github.com/ landing page (no answers)
How can I remove this entry?
First of all, that repository list sorts based on most recent activity. So, if you had recently contributed to that repo, it would be showing up there. That’s expected behavior.
The list does update automatically as you make new contributions to other repos. So, as long as you don’t make anymore contributions to the vuepress repo, you should see its name fall further down the “Respositories” list over time.
As for manually removing it, that isn’t currently possible. The dashboard view where you see that “Repositories” list is only viewable to you, and again, the list is sorted automatically based on recent activity. That all said, I can understand why you may like to remove a recently contributed to repository from that list.
Cheers!
Per #SinisterDeveloper there does not seem to be a way to remove something from the list.
However, you may find things at the very top of the list that you were once interested in but not anymore.
If you select that project and then look on the upper right, if it is marked as "Watch" or "Unwatch", then click it and select "Ignore". It seems like that might cause it to gradually drop down the list and ultimately disappear since it will no longer be seeing activity from others contributing to the repository.
At least I hope this works ...
In github, is it possible to show the diff of a single file between two commits?
One can readily diff two commits, and it is possible to link to the anchor for a specific file in those two commits, but all files are included in that view. For example, https://github.com/adamginsburg/APEX_CMZ_H2CO/compare/a94a962db51e0f4e73ec3ba4170a0ca8269548da...adamginsburg:master#diff-22
I would like a similar view, but without the other files.
(I know how to do this on the command line with git, but I want to share this link with collaborators, so the command line approach is not relevant for this question)
I think your question can be consider a duplicate of this one :
How can I generate a diff for a single file between two branches in github
Unfortunately, the accepted answer doens't answer your expected behavior.
I really tried to exclude the other files without success, and since there not seems to have other means to filter it out but html anchor pointer, I guess what you already have is what best available with Github to pin point the change you want to talk about with your peers.
I can recommend you to use Vscode with the Git History, I know is not the same as having in Github but it allows you to see the changes of the code according to an specific file or the entire project, comparing with the actual code, see all the changes of specific file through the commits, I work with this tool and this is helpful for me, hopefully it will be helpful for you.
Git History Example Usage
You can use the GitHub File Diff extension available for Chrome and Firefox.
Disclaimer: I made this extension.
Nearly every issue I file on gh refers to code on a particular branch. Does github have any mechanism to link an issue to the branch?
I need to filter issues by branch, so I am not distracted by issues in other feature branches.
Is there a way to do this? I know milestones can be (ab)used to reach a similar effect, but things get really confusing when the branch becomes a pull request and it shows up as another issue.
References
Often times issues are dependent on other issues, or at least relate to them and you’d like to connect the two. You can reference issues by typing in a hashtag plus the issue number.
Hey #kneath, I think the problem started in #42
Issue in another repository? Just include the repository before the name like kneath/example-project#42.
One of the more interesting ways to use GitHub Issues is to reference issues directly from commits. Include the issue number inside of the commit message.
By prefacing your commits with “Fixes”, “Fixed”, “Fix”, “Closes”, “Closed”, or “Close” when the commit is merged into master, it will also automatically close the issue.
References make it possible to deeply connect the work being done with the bug being tracked, and are a great way to add visibility into the history of your project.
Since March 2022, you can:
Create a branch for an issue
You can now create a branch directly from an issue to begin development work that's correlated to that issue.
Branches connected to an issue are shown under the "Development" section, which has replaced "Linked pull requests", in the sidebar of an issue.
When you create a pull request for one of these branches, it is automatically linked to the issue.
For more information, see the documentation.
Here is an animated image showing how a branch is created for an issue.
After creation, the linked branch is shown in the Development section:
The OP asked:
I need to filter issues by branch, so I am not distracted by issues in other feature branches.
It is still in public beta, but the new Development section can help you list branches associated to issues:
So for any issue you need to work on, create a new branch:
Use labels to organize issues. They aren't inherently branch-specific, but you could make a tag for each branch if that is how you want them organized.
When you have admin access to the repository, there should be a button called 'manage labels' on the issue page. That will let you add, modify, or delete labels. You can apply labels to issues a few different ways. One way is to open the issue and click the labels button just to the right of the main body of text for the issue. Once you have created a label, it will appear on the left just above the manage labels button. You can click on each label to view all the issues that have been marked with that label.
This question already has answers here:
Can I arrange repositories into folders on Github?
(8 answers)
Closed 4 years ago.
Here's the situation: I'm migrating a bunch of repos to github. The repos are currently organized into groups/directories like 'stack', 'websites', 'applications', etc.
There's no way (I've found) to create groups or folders on GitHub for repos, except with organizations, which seems a poor choice. But maybe not? The problem here is that some of the groups are very small, while others are large... with sub-groups, and I'd like to keep all the projects in one root bucket.
So, I'm left with maybe using a naming convention. Like: 'stack-apache', 'website-foo.com', 'application-some-project'. Or just giving up on organizing them in github and let the project pages / website handle the organization.
Re. scale, I'm looking at 20+ repos initially, with new repos added over time at an estimated rate of 2-5 /year for the next few years.
Anyone have experience with this kind of thing?
Update 2020
I'm not sure exactly when, but Github has (somewhat recently) added the concept of projects, which kind of fill the missing gap. I would argue they aren't quite the same as Bitbucket Projects but they are better suited to grouping related repo's in Github than Orgs
Original answer
Organisations in my opinion fit a different purpose in Github than grouping repos (although they do serve to group repos). Organisations are more about fine grained control around repo access (thats my understanding).
Bitbucket has introduced the concept of "Projects", with the following hierarchy (with a comparison to Github):
Bitbucket: Team -> has N -> Projects -> has N -> Repos
Github: Organisation -> has N -> Repos
Bitbucket still allows Repos to not be assigned to an team or project, I am guessing to support older repos that existed before the concept of a project.
To answer the question, no, not directly. There are outstanding requests with Github to add groups, but it doesn't seem likely (at this point in time).
Prefixing works as a so-so solution:
Repo name: [project]__[repo name]
Lets say you have a client "acme" with two repos:
Eg: acme__api
Eg: acme__landing
Github's search is quick and inline, so doing a search for acme__ in your repo list will list all repos for the acme__ project.
The idea really is to use organizations to group your related repo together. This also makes it easier for your team member to filter their activity feeds to only organizations they're interested into.
This is like that on Github as git is repo based, not file system based like SVN.
Maybe "Organization" is not a very intuitive name, but on alternative Git platform like Gitlab, these divisions are named "group". You should really consider them like that.
I think, the idea to group repos on the github is that just put a delimiter between items you want to be related to each other. For example, "project1_projectA_projectX", or "project1-projectA-projectX", or even "project1--projectA--projectX".
For myself I prefer the double-dash delimiter as more intuitive for replacement of the slash character delimiter (/) and less usable in a standalone repository name.
Then the list of your planning projects you have to create would be:
project1
project1--projectA
project1--projectA--projectX
As soon as you create a repository with a delimeter (_ or -) in your name, there is won't be an option to set, for example, the repo description or license from the repo title page. You have to handle these from the repository title page after a first push has made. But you can leave it simple, for example, for the projectX it would be something like this: "project1--projectA submodule".
It finally started to annoy me enough to ask this question: how do I do a basic diff between two revisions of a file in CVS? Usually I want to compare the latest revision and some random old one. I'm using the Eclipse CVS plugin. When I use "compare with->Another branch or version..." from the selected file's (latest revision from HEAD or another branch) context menu, I get a list of branches, tags and dates but not revisions. Usually I have just created a date which I know is far enough in the past so I can compare the needed revisions but I thought that there must be a better way.
The answer is to show the file's history using context menu->Team->Show history, then choose two revisions and context menu for the selection->compare with each other.
There seems to be two main ways:
context menu->Team->Show history
which shows a linear history and you can select and compare between them, however it can be very bloated and hard to read when your project has lots of branches / tags. Personally i have found it less useful than:
context menu->Team->Show Commit history
Which seems to show the history of what has been committed to the specific branch/tag you are on. You can do it per file or per folder. The output is very similar but i find it clearer. You can click on a commit date and it will show you all the files (that you are interested in) that were committed on that date.
If you double click the file, it will then bring up another menu so that you can compare it with another file in the commit history
EDIT
(i find if you double click the "other" file, it doesn't do anything, you need to click "OK" in the dialogue, which seems silly to me. This might be effected by the fact I have the beyond compare 3 plug in, im not sure if it behaves the same without it)
EDIT
There is also a little button in the top right of the commit history window that allows you to switch to history view (but i always find it easy to read than the normal history view if i do it this way round)
Both should show you the comment added when committed and you should try and read about the differences between the but personally I haven't and its only form personal experience that i prefer commit history.
I apologize for not giving formal descriptions of each, this is purely from my personal experience of using them, i have not actually researched them both yet myself...