FAQ

I am getting public key denied errors or permission denied error messages.

These are issues that often relate to your SSH setup.

Please follow the Setup guide correctly.

Should I be using Git Bash or Terminal?

If you are on Windows, please use Git Bash over Command Prompt or Powershell as it supports Bash which is what is used across this guide.

If you are on MacOS or Linux, feel free to use your default terminal.

Does it matter if the default branch is named master or main?

Yes. It is how you reference the branch and it is easiest if your remote and local repositories share the same branch name to avoid confusion.

Does the Github repository name have to match your local folder name?

No. Since all your local repository needs to know about the remote repository (see Integrating Remote Repositories) is the remote repository URL. Therefore, the names of both local and remote repositories can be different.

How do I remove the need for a passphrase when using SSH?

This involves setting up password-less authentication. You can refer to this guide: https://www.strongdm.com/blog/ssh-passwordless-login

How do I remove origin if I set origin incorrectly?

You can modify the URL for origin via: git remote set-url origin <new url>

You can rename the remote via: git remote rename <old name> <new name>

Is there a convention to using branches just for feature changes or can I just merge straight into main?

There is no fixed convention. However, traditionally, main usually represents the production ready state of the repository and is managed through CI/CD. This means that if the feature pushed straight to main has bugs, the production state will also have bugs. This is the biggest reason for using a separate feature branch before merging into main.

However, if the feature you are working on is small enough, then it is possible to merge directly into main.

How do I "unpush" a file?

This involves various steps depending on the state that the repository is in. Please refer to this guide:

Last updated