By default, the initial branch is called main.
If you’re using Git 2.28.0 or a later version, you can set the name of the default branch using -b.
$ git init -b main |
By default, the initial branch is called main.
If you’re using Git 2.28.0 or a later version, you can set the name of the default branch using -b.
$ git init -b main
This stages them for the first commit.
If you’re using Git 2.28.0 or a later version, you can set the name of the default branch using -b.
$ git add .
Note: Adds the files in the local repository and stages them for commit. To unstage a file, use 'git reset HEAD YOUR-FILE'.
By default, the initial branch is called main.
If you’re using Git 2.28.0 or a later version, you can set the name of the default branch using -b.
$ git commit -m "First commit"
Note: Commits the tracked changes and prepares them to be pushed to a remote repository. To remove this commit and modify the file, use 'git reset --soft HEAD~1' and commit and add the file again.
Follow the instructions after creating a github repo for pushing existing repo using command line.