Comments (5)
Closing this as I think we've established a strategy for our PRs.
from destiny.
What I do myself & highly recommend too:
Use feature branches for features
Once the feature is done, rebase it to origin/master
Then merge it into master with --no-ff
to intentionally create a merge commit.
This produces a very clean commit history - you know which commits came from a specific feature branch, and which ones were commited straight into master.
Take a look at my recent project as an example -- https://github.com/sarpik/turbo-schedule
The workflow looks as follows:
git checkout master
git pull
git push # do not have unpushed commits
git checkout -b feat/my-dank-feature
# develop
# commit
git fetch
git rebase -i origin/master
# rebase interactively - you can even rename the commit messages to comply
# with semantic versioning via REWORD etc.
# either
# a) merge via
git checkout master
git pull
git merge --no-ff feat/my-dank-feature
# or b)
git push -u origin feat/my-dank-feature
# and create a PR & merge it from github
# (without additional rebasing/squashing, since we've already rebased)
# I highly prefer the b) approach - by creating a PR, you get additional benefits -
# you can later link to it, see the commits & changed files more clearly, discuss etc.
and that's it!
Also, I'd recommend ditching the develop
branch for projects that do not have bigger teams & do not require multiple change previews before merging into master. It just slows you down, your hotfixes, releases & the synchronization between the master & develop branches becomes a mess, and the whole commit history becomes wrangled & unclear.
In the workflow example above - you automatically avoid the develop branch, since you're only creating feature branches straight from master.
P.S. The commit log is produced via git lg
:
[alias]
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
(~/.gitconfig
from https://github.com/sarpik/voidrice/blob/master/.gitconfig)
from destiny.
I was aiming for something like this, it is what I use on all of my personal projects and it is imo cleaner and straightforward, no develop, just a master branch
notice PRs closed with squash merge have a #PR number in the commit
from destiny.
I agree that we should squash in cases where PRs do not use conventional commits or the commit messages does not make sense.
In cases where the PRs is using conventional commits correctly I would prefer to simply merge instead of rebase as it gives a clearer tree of what actually happened.
Why are you preferring rebase over merge in that case. Is it just to keep the structure flat?
from destiny.
Yes, just to keep the structure flat, I've use it in my workflows it it seems really nice, however I can see why you wouldn't want to do a rebase.
from destiny.
Related Issues (20)
- Different folder structure results in Windows vs Linux: missing src folder HOT 3
- Wrong shared file location HOT 1
- Documentation on best/common way to integrate into a project HOT 1
- Incompatible with TypeScript projects HOT 6
- Markdown support
- remote.require() HOT 1
- Benchmarking Destiny on CI
- collapse top level index folder HOT 10
- Why use this project over webpack? HOT 4
- Dynamic Import Problem HOT 1
- Cannot find import .yml file in svelte import HOT 3
- Tests are failing in Windows HOT 3
- Support for Dart
- bug: file movement HOT 6
- Module with its leaf dependencies in same folder HOT 1
- Destiny folder depth limit
- Error in dynamic path imports HOT 1
- Feature request - Allow placing files being fractalized _inside_ the folder
- Alternatives to destiny (project seems abandoned) HOT 3
- Would this eslint rule help destiny? `single-export-per-file`
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from destiny.