NUS Hackers Wiki
NUS Hackers Wiki
  • NUS Hackers Wiki
  • Hackerschool
    • Virtual Machines and Linux
    • Beginners' Guide to the Terminal
      • Introduction to the Terminal
      • Modern Shell Tools
      • Shell Scripting
      • Real World Scripting
      • Resources
    • Self-Hosting: Three Easy Pieces
      • 1. Setting up your server
      • 2. Running Services
      • 3. Monitoring your server
    • Vim
    • Introduction to Zig
      • Language Basics
      • Error Handling
      • Memory Management
      • Working with C
      • Exploring comptime
    • CI/CD with Github Actions
      • Background
      • Basics of Github Actions
        • Target workflow
        • Running unit tests
        • Linting code
        • Deploying to Github Pages
      • Advanced use cases
        • Pollers
        • Github script
        • Executing third-party scripts
        • Reusable workflows
      • Cookbook
    • Lightning Git
      • Git Concepts
      • Getting Started with Git
      • Making your first commit
      • Branching
      • Merge Conflicts
      • Integrating remote repositories
      • Collaborative Workflows
      • Commit Manipulation and Reflog
      • Interactive rebasing
      • filter-repo
  • Orbital
    • JavaScript
      • Browser Developer Tools
      • Getting Started
      • Datatypes
      • Operators and Operations
      • Loops and Conditions
      • Functions
      • Strings
      • Arrays
      • HTML
        • Getting Started
        • Tag Attributes
        • HTML Forms
        • Browser Inspector
      • CSS
        • Selectors
        • Colors in CSS
        • Measurements in CSS
        • The Box Model
        • Adding Styles - Part 1
        • Adding Styles - Part 2
      • Working with the DOM
        • Querying the DOM - Selectors
        • Querying the DOM - Element Attributes
        • Querying the DOM - Element Styles
        • Events with JS and HTML
        • Exercise: Click Counter
        • Editing the DOM
        • Fetch Requests
        • Exercise: The NUSMods API
    • React
      • Setup
      • State
    • React Native
      • Setup
      • Intro to JSX
      • Basic Syntax
      • Handling UI
      • Props
      • State Management
    • Git
      • Setup
      • Command Glossary
      • Fundamental Concepts
        • Getting Started
        • Integrating Remote Repositories
        • Branching
        • Merge Conflicts
      • Collaborative Workflows
        • Fork and PR Workflow
        • Branch and PR Workflow
      • Advanced Concepts
        • Ignoring Files
        • Commit Message Conventions
        • Github Collaborators
        • CI/CD with Github Actions
        • Advanced Git Commands
      • FAQ
    • Telegram Bot
      • Creating a TeleBot
      • API Calls
      • Telebot Basics
      • Integrating API's
    • Relational Database
      • Database Overview
      • Database Design
      • Entity Relationship Diagram
      • SQL Basics & PostgreSQL
    • TypeScript
      • Types and Interfaces
      • Utility Types
      • Typing Component Props, Events, and Hooks
      • Why You Should Avoid Using any (and What to Do Instead)
      • TypeScript Tricks You’ll Use All the Time in React
Powered by GitBook
On this page
  • I am getting public key denied errors or permission denied error messages.
  • Should I be using Git Bash or Terminal?
  • Does it matter if the default branch is named master or main?
  • Does the Github repository name have to match your local folder name?
  • How do I remove the need for a passphrase when using SSH?
  • How do I remove origin if I set origin incorrectly?
  • Is there a convention to using branches just for feature changes or can I just merge straight into main?
  • How do I "unpush" a file?
Edit on GitHub
Export as PDF
  1. Orbital
  2. Git

FAQ

PreviousAdvanced Git CommandsNextTelegram Bot

Last updated 11 months ago

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:

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:

https://www.strongdm.com/blog/ssh-passwordless-login