Forge deploy scripts in version control
A nice trick by my colleague Seb
Read more [sebastiandedeyne.com]
Posts tagged with version control
A nice trick by my colleague Seb
Read more [sebastiandedeyne.com]
Git is a gift that keeps on giving
Read more [wouterj.nl]
Join 9,500+ smart developers
Every month I share what I learn from running Spatie, building Oh Dear, and maintaining 300+ open source packages. Practical takes on Laravel, PHP, and AI that you can actually use.
No spam. Unsubscribe anytime. You can also follow me on X.
Jujutsu (jj) is a new version control system from a software developer at Google with a focus on DX.
Read more [v5.chriskrycho.com]
– blog.logrocket.com - submitted by Leonardo Losoviz
This is an intro to how transpiling works for PHP: Similar to how Babel compiles JS to make it compatible with older browsers, Rector can convert PHP code across versions. So we can use PHP 7.4 features (typed properties, arrow functions), and deploy it to PHP 7.1.
Read more [blog.logrocket.com]
From time to time I need to remove all history from a GitHub repository, for instance right before releasing a package I've worked on in private. Sometimes I don't want people to see all mistakes I've made along the way :-).
Frederick Vanbrabant published another delirious rant on his blog. This time it's about atomic commits.
Atomic commits, sometimes also called micro commits, is the practice of explaining your thought process in the form of commit messages and code. It comes down to documenting the way to the solution.
https://frederickvanbrabant.com/2017/12/07/atomic-commits.html
Today I accidentally committed a multi GB file to the git repo of the project I was working on and pushed it. Damn! Because of that big file cloning the repo again would take a long long time. Removing the file locally and pushing again would not solve the problem as that big file is in Git's history.
So I took a few moments to Google around and learned that that there actually is a git command that can rewrite history: filter-branch. This is how I removed that big file from history:
git filter-branch --tree-filter 'rm path/to/your/bigfile' HEAD
git push origin master --force
Both commands took a while to complete, but after that I had a light repo again.
If you need to do this, be sure to keep a copy of your repo around in case something goes wrong.
Here's an old, but still seemingly still correct blogpost by Dalibor Nasevic with some more info on the subject.
Few weeks ago I froze gems on my blog and ended up with a very big repository. So, I wanted to clean up the mess and remove permanently gems folder from the repository. git rm wasn't doing the job well, it only removes the folder from the working tree and the repository still contains the objects of this folder. After a quick search, I found that git-filter-branch was the command I was looking for.
https://dalibornasevic.com/posts/2-permanently-remove-files-and-folders-from-a-git-repository
You've successfully created a PR and it's in the queue to be merged. A maintainer looks at the code and asks you to rebase your PR so that they can merge it.http://akrabat.com/the-beginners-guide-to-rebasing-your-pr/Say what?
The maintainer means that there have been other code changes on the project since you branched which means that your branch cannot be merged without conflicts and they would like to you to sort this out.
These are the steps you should take.