git status - fatal: cannot chdir

tldr: If you make any changes to the file path of a git submodule, you need to also update all of your config files accordingly. Background I use the Papermod Hugo theme for my personal website. One of the ways to use Hugo themes is to install them as a submodule inside your project’s ./themes directory. I wanted to update the module today as there have been a number of changes since I set it up....

May 26, 2022 · 3 min · Me

Git

Pull changes in from master that have happened since making changes on feature branch git checkout feature git rebase master Merge feature branch into master To merge a feature into master, first commit changes to your feature branch, then: git checkout master git pull origin master git merge feature git push origin master See history git log to see all. Include file if you only want to see history for that file: git log [filename]

March 22, 2022 · 1 min · Me

Change git branch (master to main)

Here’s another thing I’ve googled enough times to just put it somewhere I know. First, rename your local branch: ❯ git branch -m master main Then you can check that it worked: ❯ git status On branch main Your branch is up to date with 'origin/master'. nothing to commit, working tree clean If you don’t have dependencies that might get screwed up by simply renaming your master branch, you can just navigate to your remote directory and change the name (if you use github, from the repo’s home page, click Settings > Branches and then click the edit button that looks like a little pencil)....

March 17, 2021 · 1 min · Me