Git Command First Time

Importance of Git can not be explain why or where you should use it, you can find it on google search about git and github in details. Today I am sharing command to add new git files on a directory.


At first I created a git reposiory manually from github account. Now from the computer files directory which files I want to share on github there I open git software command line now follow these commands.


git init
git add --all
git commit -m "my first commit"
git remote add origin https://github.com/shohagcsediu/Problem-Solving.git
git push -u origin master

finally I have done it and added my codes to github.

How to change git branch from command, let me tell you git branch switch easy way.

git checkout branchname

This command will switch your codebase to target branch name you write with it.

0 Comments