![]() ![]() Keeping any shell changes you make on one machine up to date on all the machines you code on is a nightmare without the right tooling. Keeping developer experience consistent across machines ![]() Terminal prompts can be made git aware and use colour to indicate state so you donât have to query git so often. You can replace tools like ls or cat with modern equivalents that support full colour, unicode icons, git state and more. But other developer tooling has advanced quite a bit since then. Many of the terminal tools that come with unix environments are functionally similar to how they were 20 years ago. The latest version lets you run a full Ubuntu instance that integrates seamlessly with the underlying windows instance.Ä«y using WSL2 you can have a (mostly) identical developer experience jumping between MacOS and Windows. Windows âWSLâ (Windows Subsystem for Linux) is a great tool for this you can use on Windows 10 and newer. I need to use the same tools and the same experience on both. I regularly code on both MacOS and Windows machines and I was always annoyed how different the default experiences are on each. Apply some research and get the hash of the last commit of a rebase operation you are/were satisfied with and rebase to that point with interactive mode: git rebase -i that-hash. You wont need this for every rebase but itâs really handy for tricky ones. You shoud be able to get to the last successfull rebased commits from the reflog: git reflog. I highly recommend creating a ârestore pointâ tag to go back to if you need it. If was provided when the rebase operation was started, then HEAD will be reset to <.This is destructive and you want to be able to revert it if youâre not happy at the end. Abort the rebase operation and reset HEAD to the original branch. Superpower tip - First create a restore marker or tag if youâre unsure of rebasing Itâs most likely that your master branch is locked against making destructive changes anyway. git rebase skip: When rebasing the branches we might face some unresolved conflicts to skip the particular encounters we will use git rebase skip. You could really mess up some of your colleagues work. git rebase abort: Git rebase abort command cancels a rebase that is currently underway and restores the branch to its initial state. Itâs ok to make changes like this to master/main branch on personal projects because youâre the only person using the repository.Ä«ut you probably donât want to do this on anything other than a feature branch when youâre working in repo with many other users. ![]() I donât use rebase very often so here are my notes on this. I just needed to change the user that committed the code without changing any of the other history. I had to change some of my Git history because I had used the wrong Github user to push some changes to personal projects. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |