0% found this document useful (0 votes)
57 views

Github Commands

1. The document outlines the necessary Git commands for pushing and pulling a project to and from GitHub. It covers commands for initializing a project, adding files, committing changes, and pushing commits to a remote repository. 2. Branching commands are also included, such as checking out, creating, and switching branches. 3. Additional commands are provided for making changes to a project, committing them, and pushing the changes to the main branch or another branch on GitHub. Merging changes from another branch into the main branch is also described.

Uploaded by

Md. Mehedi Hasan
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
57 views

Github Commands

1. The document outlines the necessary Git commands for pushing and pulling a project to and from GitHub. It covers commands for initializing a project, adding files, committing changes, and pushing commits to a remote repository. 2. Branching commands are also included, such as checking out, creating, and switching branches. 3. Additional commands are provided for making changes to a project, committing them, and pushing the changes to the main branch or another branch on GitHub. Merging changes from another branch into the main branch is also described.

Uploaded by

Md. Mehedi Hasan
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Github All Necessary Commands

How to project push & pull :


SL Command What it will do Remarks/Commands
1. Create resiptory in github website Create new resiptory Do it manually
2. git config --global user.name "Sam Install : gitbash
Smith"
Run gitbash from
git config --global user.email project location
[email protected]
3. git init
4. git add * all file will ready to add

5. git status show added files in Green color mark


bash
6. git commit -m "Commit message" Message to the files

7. git remote add origin <project link> Location set if failed: git remote rm
origin
then do SL 7.
8. git remote -v Showing added origins

9. git push origin main Pushing project to the Another command:


resiptory git push -u origin main

1o. git clone <project link> First time clone project No need if u don’t want
/ Download the project to download
from github

11. git pull origin main sink with github

Branch system:
12. git checkout -b <branchname> Create new branch
13. git checkout <branchname> Switch to another
branch
14. Git branch Show all available
branch
Project e change korle:
15. git add *
16. git status

17. git commit -m "write what u did"

18. git push origin main Onno branch e kaaj


korle sey branch er
name dibo

Onno branch e project push korle/main e merge korte hoile:


19. git checkout main Switch to main Must do

20. git merge fuad Fuad branch e ja korci


segulo main e chole
jabe

You might also like