Fixlogbook · English guides

A little less stuck with Git.

Start with the error you see. Find out why it happens, try the fix, and check the result with real screenshots.

Fix "fatal: not a git repository" by locating the repository in PowerShell

Check the current folder, locate your existing project, and verify the Git root in PowerShell. Distinguish an unborn repository from a source ZIP while preserving existing files.

Read guide →

Fix "src refspec main does not match any"

Check the local branch name and whether a first commit exists. If main shows No commits yet, review every staged file and its contents before creating the first commit and pushing.

Read guide →

Fix "The current branch main has no upstream branch"

The error "fatal: The current branch main has no upstream branch." means main has no default push destination configured. Check the remote URL and branch, then push and set the tracking relationship together.

Read guide →

Resolve a Git merge conflict and finish the merge

When two branches change the same section differently, resolve the Git merge conflict by editing and saving the files, then creating a merge commit. Check that the conflict is gone and both branches' commits remain.

Read guide →

Keep detached HEAD work by creating a Git branch

If you worked in a detached HEAD state, create a branch at the current commit before switching elsewhere. Check that the new branch points to your work commit and the file contents remain unchanged.

Read guide →

Stash new files along with your changes

If untracked new files remain after a regular git stash, add -u to stash them too. Choose an entry from the stash list, apply it, and check that your files return.

Read guide →

Undo git add without changing file contents

Use git restore --staged to leave a staged file out of your next commit. Keep its working file contents and confirm that it is no longer staged.

Read guide →

Fix the last commit message with git commit --amend

If your last Git commit message has a typo, check the staging area before using git commit --amend. Update the message of an unpushed commit, then check the new message and unchanged file contents.

Read guide →

Undo a shared commit with git revert

To undo a commit after git push, use revert to create a new commit that reverses its changes. Check the target, preserved history, and restored file state before pushing.

Read guide →

Use git cherry-pick to bring in just the commit you need

To bring in one commit from another branch, review its changes and apply it with git cherry-pick. Check the history, file list, and functionality to confirm that only the intended fix was added.

Read guide →

Use git worktree to open another branch without disturbing your work

Use git worktree to work on multiple branches at once. Keep uncommitted changes in your current folder, open another branch in a separate folder, and check each folder's branch and change status.

Read guide →

Stop tracking a file when .gitignore has no effect

Files Git already tracks still appear as changed after you add them to .gitignore. Check the ignore rule, stop tracking the file while keeping the local copy, and commit the change.

Read guide →

Fetch a remote branch to fix Git's invalid reference error

If git switch reports fatal: invalid reference: feature-report, check the branch name and remote branch list. Fetch updated remote information, then create and switch to a local branch that tracks the target branch.

Read guide →

How to fix a git push non-fast-forward error

A git push non-fast-forward error occurs when your branch is missing remote commits. Follow the screenshots to fetch those commits, merge them, and push again.

Read guide →

Compare staged changes and working files with Git diff

Editing a file again after git add can make the working file differ from the staged version. Use git diff to check additional edits and git diff --cached to check what will go into the commit.

Read guide →

Trace file history and renames with Git log

If commits from before a file rename are missing, add --follow to git log. Trace the history under the previous path, then use git show to inspect the changes in a commit.

Read guide →

Rename a Git branch: A local branch before pushing

If an unpushed local branch has a typo or needs a different name, rename it with git branch -m. Then check the current branch name and latest commit.

Read guide →

About these notes

These are English editions of selected guides from 저니머니의 실무노트, by 저니머니. The guides focus on everyday problems with clear steps and real application screenshots.

Commands, screenshots, and their explanations are checked together. Each English guide links to its Korean edition. Start with the cause and quick fix, then use the detailed steps if you need a closer look.

Found something unclear? Get in touch.

Full introduction in Korean →