325
votes
Accepted
Maintain hundreds of customized branches over master branch
You are completely abusing branches! You should have the customisation powered by flexibility in your application, not flexibility in your version control (which, as you have discovered, is not ...
201
votes
Accepted
Why squash git commits for pull requests?
So that you have a clear and concise git history that clearly and easily documents the changes done and the reasons why.
For example a typical 'unsquashed' git log for me might look like the ...
182
votes
Accepted
Should I submit a pull request to correct minor typos in a Readme file?
Just fix all the typos you noticed and create a pull request with a comment along the lines of 'Fix typos'. Then it's one button to click for a person with the correct access.
You don't need to ...
110
votes
Accepted
If GitHub interacts with Git, and Git is licensed under GPLv2, shouldn't GitHub be open source?
3 reasons why:
According to the terms of the GPL, people accessing GitHub via the web is not considered releasing (or propagating in GPLv3 terms), and so GitHub is not required to share their source ...
94
votes
Maintain hundreds of customized branches over master branch
Having 500 clients is a nice problem, if you had spent the time up front to avoid this problem with branches, you may never have been able to remain trading for long enough to get any clients.
...
93
votes
Should I keep my GitHub forked repositories around forever?
You can delete your fork as soon as you submit a Pull Request, regardless if it's merged or not. GitHub stores all PRs in the upstream repository, meaning proposed changes are tracked even if the fork ...
81
votes
Accepted
In code review, should I ask to do a refactor outside of the scope in a pull request?
There are several relevant trade-offs here:
Review complexity. If a branch has more than one functional change commit or more than one refactoring commit it becomes time-consuming to review the ...
77
votes
Accepted
Should I keep my GitHub forked repositories around forever?
As of February 18, 2021, the “Unknown Repository” issue has been resolved. You should be ok to delete repositories once all the branches have been merged.
Old answer:
Deleting forked repositories ...
75
votes
Should images be stored in a git repository?
This question is pretty old but this is a common question that comes up when dealing with Git and there has some progress on modern solutions to storing large files in a Git repo since the last answer....
72
votes
Accepted
The trend of the "develop" branch going away
It comes from the CI mindset where there is integration several times a day.
There are pros and cons of both.
On our team we have abandoned the develop branch as well since we felt it provided no ...
72
votes
Accepted
Understanding the difference of branch between SVN and Git
I am a user of SVN and now I am learning GIT.
Welcome to the gang!
SVN Re-education
In SVN I usually [...]
Hold on for a moment. While CVS and SVN and other traditional (i.e. centralized) ...
72
votes
Accepted
What is the best way to code review a work-in-progress?
GitHub allows for PR to be in a "draft" state. Your team can see the differences, and even comment on it, but it's still obviously a work-in-progress, and cannot be merged until you click a &...
55
votes
Should I submit a pull request to correct minor typos in a Readme file?
Some context that may or may not be relevant.
A cloud hosting provider named DigitalOcean hosts an event every year called Hacktoberfest to encourage people to contribute to open source projects in ...
49
votes
Accepted
What to do with abandoned issues in GitHub?
This is a dilemma: you cannot close the issue as "fixed", because you don't actually know if it was fixed, or at least even if some issue was fixed, you don't actually know whether this was the issue ...
43
votes
Accepted
How to use github, branches and automatic releases for version management?
You should look at git-flow. It's an excellent (and popular) branching model.
Git Flow Summary
Branching
The main trunks that stay around forever are develop and master. master holds your latest ...
43
votes
Accepted
How should I contribute to a (mostly) abandoned GitHub project?
I haven't had this situation yet, but that's what I would try:
Try contacting the owner
Maybe they really lost interest, but are willing to transfer the project to somebody else, in particular ...
42
votes
In GitHub flow, is it OK to base feature branch on another feature branch?
Here is the workflow that I follow when I branch from a feature branch:
Create feature-branch-B from feature-branch-A
Work on feature-branch-B
If more commits are added to feature-branch-A after ...
40
votes
Maintain hundreds of customized branches over master branch
In the future, ask the Joel test questions in your interview. You'd be more likely not to walk into a trainwreck.
This is an, ah, how shall we say... really, really bad problem to have. The "interest ...
36
votes
Accepted
Is it better to start a Pull Request or perform a local merge commit on master?
git-merge mechanism:
Using git merge feature while on master merges the branch feature to master and produces a merge-commit (if the branch cannot be fast-forwarded) in the git history. To force a ...
33
votes
Why squash git commits for pull requests?
The main reason from what I can see is as follows:
The GitHub UI for merging pull requests currently (Oct 2015) does not allow you to edit the first line of the commit message, forcing it to be Merge ...
33
votes
The trend of the "develop" branch going away
There are two philosophies I've seen in projects, and I think the choice is just a matter of taste:
Designate 'master' as the production release and develop in a 'develop' branch.
Develop in 'master' ...
32
votes
Why squash git commits for pull requests?
Because often the person pulling a PR cares about the net effect of the commits "added feature X", not about the "base templates, bugfix function X, add function Y, fixed typos in comments, adjusted ...
32
votes
The trend of the "develop" branch going away
A develop branch matters more if your process to release is complex and you need to have serious release-candidates.
For example, imagine you are writing software which is firmware on cars. This is......
31
votes
Should I create separate work and personal GitHub accounts?
I say you can eat the cake in have it too! Introducing GitHub Organizations.
Use your GitHub account for your personal projects, and create an organization for your professional projects. The ...
31
votes
Understanding the difference of branch between SVN and Git
In SVN I usually checkout on my local machine a repo, which includes all branches in my project and I used to select the folder for my branch I am interested to and work there.
Unless you check out ...
29
votes
Accepted
Should I use git stash to save ongoing changes of my project and push it to github to access in other computers?
I've simply committed unfinished (and messy) states of my code before (and pushed it) only for the purpose of pulling that in the other computer to continue the work. I am pretty sure this a bad ...
27
votes
Accepted
On GitHub, etiquette and pull requests
If you want to message them via GitHub, why not use Mention Notifications? Open an issue on your own repository and mention the forker in that issue. The issue should be relevant to the stuff you want ...
26
votes
In code review, should I ask to do a refactor outside of the scope in a pull request?
Just nitpicking, but usually I try to do the refactor before the change:
Commit 1: Refactored class hierarchy in preparation for feature XY-123
Commit 2: Implemented feature XY-123
Another one I ...
24
votes
Declaring multiple licences in a GitHub project
You can use any mechanism to include those licenses that you like, as long as it becomes clear to a visitor of your project which license is applicable to which portion of the project.
My preference ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
github × 344git × 166
open-source × 52
version-control × 38
licensing × 28
pull-requests × 23
branching × 19
workflows × 18
gitflow × 17
forking × 14
etiquette × 13
repository × 12
code-reviews × 9
issue-tracking × 9
project-management × 8
legal × 8
svn × 8
mit-license × 7
gitlab × 7
java × 6
python × 6
continuous-integration × 6
collaboration × 6
php × 5
web-development × 5