Tag Info

Hot answers tagged

66

As you mentioned in your question, people fork repositories when they want to make a change the code, because you don't have write access to the original repository (unless you've been added as a collaborator by the owner of the repository). In the forked repository they have write access and can push changes. They may even contribute back to the original ...


34

In our line of work we tend to look for technical reasons, but in my opinion the primary reason isn't technical. If you look at GitHub Help or other GitHub tutorials, forking a repo is one of the major steps for how you "do" GitHub. When people are learning and evaluating GitHub, just about every tutorial out there is going to tell them to fork a repo as ...


33

Yes. You never know when more people might be brought on to the project. Also, repos allow you to rollback when you accidentally add something that doesn't work. You could use git for version control on your own machine without the need for a centralized repo. However, as long as you're using git, you might as well set up a repo on on GitHub. It only ...


23

You assume the fix does not introduce any new issues and fixes the old ones complete. But lots of fixes are worth a review on their own - and that is probably much easier when the incremental changes can be reviewed separately.


19

You should put the unit tests in the same repository because otherwise someone has to answer to the question "Where are the tests?" every time the project is handed over from one person to another. References to other repositories tend to get invalid over time when repositories are relocated and people change from one version control system to another. Just ...


18

Actually, there is little reason NOT to use a code repository. Just the fact that I can easily roll back to any prior version has covered my rear end so many times when I accidentally introduced regression bugs - despite my automated tests. If you need a recommendation - try Mercurial. It's really simple, yet very powerful. I would avoid Git because of its ...


18

Git tends to experience performance problems when used with large repositories. To quote Linus: And git obviously doesn't have that kind of model at all. Git fundamnetally never really looks at less than the whole repo. Even if you limit things a bit (ie check out just a portion, or have the history go back just a bit), git ends up still ...


17

SVN works on both case sensitive and case insensitive filesystems, so it must assume the most compatible option, which is case sensitivity.


17

One possible reason: they have running code that depends on those projects and their build process involves pulling the dependencies from github. Having the fork protects them against breaking changes. For projects that don't tag versions, this is the easiest way to achieve that.


15

Returning IQueryable will definitely afford more flexibility to the consumers of the Repo. it puts the responsibility of narrowing results off to the client which naturally can both be a benefit and a crutch. On the good side, you won't need to be creating tons or repository methods (at least on this layer) GetAllActiveItems, GetAllNonActiveItems, etc.. to ...


14

The entire point of Github is "social coding". Personally, I fork repositories when: I want to make a change. I think the project is interesting and may want to use it in the future, but have no easier way of saving it for later on the device I'm currently using. I want to use some or all of the code in that repository as a starting point for my own ...


14

They want [something that can] show their changes across all projects instead of trying to remember what project they made a change [to]. Sourcetree (a free-as-in-beer GUI Git frontend) allows you to register multiple repositories, organise them into logical groups, and then view status across all of them at once: I am not affiliated with them in any ...


13

TL;DR; the equivalent of a git repository is a CVS module, not a CVS repository. CVS is designed with a notion of modules being a subdivision of a repository, and it is common to use CVS repositories with several modules having a quite independent life. As an example, it is easy to have branches specific to one module and not present in another. git has ...


12

Unless there exists a specific reason for you to think that each one of them deserves an invidual repo (Will they grow a lot? Probably not!) it seems more reasonable to put them all in one repo, and save yourself the trouble of cloning all of them from 20 repos. Keeping each one in a separate repo seems like the path of creating a problem where a problem ...


11

There doesn't seem to be an argument in favor of the big repo in this thread, so here's one: The advantage of a big repo with all your code in it, is that you have a reliable source of truth. All the state in your overarching project is represented in that repo's history. You don't have to worry about questions like "What version of libA do I need to build ...


10

Repository returns domain objects and is built on top of mapping layers. For a very simple domain domain objects and database tables can be very much the same. If your repository is always returning exact representation of your data structure then it might actually be Table Data Gateway aka Data Access Object(DAO). Example: Your database has tables for ...


10

You should create a new repo for each independent project. Why? Someone working on project D does not have to download all the history for E and F. Git repos are cheap to initialize, so you can use as many as you like. It is painful to work with multiple projects at once when they are represented as branches in a repo: When switching from A to B to quickly ...


9

I'm a relative newbie to version control; I've used mostly SVN, a little Mercurial, and even less Git, for only a few years now. That said, I think the following is probably good advice: Make small commits often. When you commit changes, commit only related items together to keep things coherent. This helps later on when you're looking back through commit ...


9

Short answer ... Start out with the repositories in your personal account. From there, if/when things grow and/or get popular with the community, move them to an organization account. GitHub Blog: Repository redirects are here! Long answer ... Let's look at some of your options: 1. Organization: For more information on GitHub Organization features, ...


8

As noted, svn log will get you this answer. But this really isn't suitable for time tracking -- just about all accounting systems need a hole for restatement, editing a svn commit description can be tricky if not impossible due to post-commit hooks. You might want to look at something like redmine which integrates with SVN and has a time tracking feature ...


8

I think you should think who has an interest to change that respective class. For example if you have an User class with an CalculatePay method and a save method. The accountant would want to change the CalculatePay and the DB administrator the save method. These are two different responsibilities. The SRP means grouping together things that change for the ...


7

Well, nowadays with the third generation of Source control, it's not that hard to start using them specially git or mercurial, I cannot think on any downside of why you should not use any of them. Also If you do not want to set a remote environment you can use sites like Github, bitbucket, CodeGoogle to keep your source up, and grab it whenever you want. I ...


7

You want the version of the tests to match the version of the code, so that implies you keep the tests in the same repository as the code. That goes for automatic code generation scripts, build scripts, etc. too.


7

AS the other posters pointed out, you can add more than one remote then simple push to each. There is a better way, though, of creating merged remotes to where when you push to your remote, it actually pushes to two remotes. This answer has the detailed steps: http://stackoverflow.com/a/3195446/525703


7

Realistically, you've got three alternatives if you want deferred execution: Do it this way - expose an IQueryable. Implement a structure that exposes specific methods for specific filters or "questions". (GetCustomersInAlaskaWithChildren, below) Implement a structure that exposes a strongly-typed filter/sort/page API and builds the IQueryable internally. ...


7

Use the entire method signature to specify your intent, not just its name. Method names should represent verbs not phrases. Your method signatures can be written as: Get(object id) Get(Date day) Update(object id) Get(string name, string surname) Get(Filter filter) Get(string name, string surname, Date day, string country) Get(Date greaterThan); Get(Date ...


6

The non-windows world is dominated by case-sensitive file systems.


6

Re: "UOW tracks the elements that needs be changed, and repository contains the logic to persist those changes, but... who call who?" You understand the basic responsibilities of these classes. You say that each of the articles, that you've read, connects them together in different ways. This implies that the decision about "who calls who" is up to you. ...


6

You are intermixing entities should not access the repositories (which is a good suggestion) and the domain layer should not access the repositories (which might be bad suggestion as long as your repositories are part of the domain layer, not the application layer). Actually, your examples show no case where an entity accesses a repository, ...


6

There really is only one legitimate answer: it depends on how the repository is to be used. At one extreme your repository is a very thin wrapper around a DBContext so you can inject a veneer of testability around a database-driven app. There really is no real world expectation that this might be used in a disconnected manner without a LINQ friendly DB ...



Only top voted, non community-wiki answers of a minimum length are eligible