top of page

Welcome to git



Today we learn the steps to push your local repository to github.


Before push your repo to github. let's learn some commands of git.


  1. git init

This command will initialise the git repository in your folder.

2. git branch

Using this command you can check number of branches of your project

3. git checkout -b branch_name

Using this command we can create new branch of your project


4. git add .

Using this command we can add new files to our branch


5. git commit -m "message"

This command will help us to commit our changes to our local branch


6. git status

Using this command we can check current status of branch


7. git merge branch_name

To merge one branch into another branch


8. git pull origin branch_name

To take pull from another branch


9. git remote add origin web_repo_link

To create reference


10. git push origin branch_name

To push code to your branch


11. git log

To check logs

12. git reset hard HEAD

To back to your last commit.

コメント


bottom of page