Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Always test before committing.
But when that fails, rebase your commits to clean up your history.
(Disclaimer: I'm assuming this is git, since the screenshot looks like github) -
I can't even explain how many times I have a series of commits that are basically "here's the thing" and "actually committing the thing"
-
m93mark2758y@Yankeesrule a ninja rebase or a reset of the last commit to delete evidence hoping that the change has not been pushed yet
-
dreik14168yCorrect me if I'm wrong, but it's a bit hard to revert a commit that has been pushed to the remote, isn't it? @m93mark
-
@dreik It's not hard at all. You just need to force push it afterwards (which is destructive and can screw stuff up if you're not careful).
The problem is if someone pulled those commits already. Then other people's local history will be different from the one in the remote repository, and git will throw a hissy fit when they try to pull the new changes. -
dreik14168y@DoctorWhatIf yeah, that's what I thought too. It won't be much of a problem for a single person project, but could be near impossible in a team project. Anyways, better to test always before pushing.. ;)
-
@dreik It can still be good in a multi-person project, as long as everyone is pushing to their own branches (and amending, and force-pushing, etc) before pushing that work into the master branch (where others can get it).
At my current job each developer has their own repository (fork of the main one) and can only push changes to be released via a Pull request. Until that is merged, it's usually fine to fiddle around with history. After that, it's set in stone. -
dreik14168y@DoctorWhatIf thanks for sharing that info. Wish there was a direct message feature. I would really like to know more about the git workflow at your place because we also just started using git. so we are looking for ways to improve and optimize our workflow.
-
@dreik Well, ours is fairly straightforward.
We're using GitHub. There we have the "company" account (with restricted access), which has the production-ready code.
When working on a feature, a developer forks the appropriate repository, which creates a copy of the repository under their account. In that repo they do whatever they want (feature branching, etc.)
When a feature is completed, the developer creates a Pull request into the master branch of the "company" repository.
The creates pull requests then trigger the Continuous Integration flow (using teamcity) that will build th code and run all tests.
Once the code is reviewed the PR is merged and that triggers a deployment to the acceptance environment, followed by production.
You could also achieve the same under a single repo if every developer had their own branch(es) and *no one* pushed onto master.
Is that clear? Feel free to ask any questions, I'll be glad to answer them if I can. -
dreik14168y@DoctorWhatIf yep, with you so far. We are using GitLab currently. We haven't yet looked into CI. Thanks for all the info. I really appreciate it. Can I bug you with few more questions?
Do you guys use a project management/ task management system? And how do you allocate time for tasks? Just estimating or are you guys using any technique for that? -
@dreik As I said, ask away βΊοΈ
We use JIRA (from Atlassian) as our management system.
We don't assign time though, we just estimate complexity (we're using Scrum here). So, we have some baseline stories we use to anchor our estimations of new ones.
The only "technique" we use to estimate is Planning Poker, where every team member has a deck of cards with point values on them, and everyone shows their estimations at the same time (to avoid bias). If there are differences, we then discuss them to reach a consensus.
PS: I also heard good things about, but never tried, the Hamburger Method for splitting user stories better, in order to estimate them more easily: https://gojko.net/2012/01/... -
dreik14168y@DoctorWhatIf I'm gonna check these out now. I've earned about things like planning poker, but haven't used it actually. Thanks Mister Doctor π
Related Rants
Don't be like jimmy... test before committing! π
undefined
git
shit happens
words of wisdom