Changing the default branch in GITHUB SETTING
Here are a few ways to rename the main branch in Git:
1. Rename the local branch:
git branch -m main new-main-branch
Changing the default branch in GITHUB SETTING
Here are a few ways to rename the main branch in Git:
1. Rename the local branch:
git branch -m main new-main-branch
<!-- | |
DON'T USE ASTERISKS ! | |
USER_NAME = enter your github user name | |
REPO_NAME = enter the name of what you'll call that repo | |
--> | |
gh repo create *USER_NAME*/*REPO_NAME* --source=. --public --push |
import { Component } from "react"; | |
// old method of class in react | |
class CountClass extends Component { | |
constructor(props) { | |
super(props); | |
this.state = { | |
count: 0, | |
title: "Welcome", | |
}; |
import express from "express" | |
const app = express() | |
const port = 3030 | |
app.use(express.json()) | |
app.listen(port, () => { | |
console.log(`Server listening on port ${port}`) | |
}) |