WHAT IS GIT AND GITHUB ?

Posted by

Git is a Developers tool which is use for source code management Git is a free and open source distributed version control system designed to manage any type of projects from small to very large projects with speed and efficiency. It is release on  7 April 2005.

1. How to store repository in your local or clone?

$ git clone paste HTTPS URL

2. How to initialize your git hub data?

$ git init

3. How to set your Email and User name in git?

$ git config --global user.email "example@gmail.com"
$ git config --global user.name "Your Name"

4. How to ?

cd "C:/Program Files"

5. How to pull?

$ git pull

6. How to check version?

$ git --version

7. How to push on git hub files though git bush procedure?

$ git add .
$ git commit -m "Comment"
$ git push origin master

8. If “git push origin master ” not working.

$ git push origin main

9. How to add SHH key to git bash

= Go to your c: drive –> Users –> Go to your PC file and open git bash and run this

$ ssh-keygen -t ed25519-sk -C "your_email@example.com"

Open SSH file then copy all, Open your GITHUB Go to –> Settings –> SSH and GPG keys –> Click on New SSH key paste in “key” .

10. How to link local repository using git bash?

$ git remote add origin (github-link)

11. How to see what was the commited flie?

$ git show

12. How to see history of commits?

$ git log

13. How to Checking out a branch updates the files in the working directory

$ git checkout

14. How to delete locally?

 $ git branch -d <branch>

15. How to make file in your local?

$ mkdir src

16. How to rename ?

$ git mv name1 name2

17. How to see how many branches you have

$ git branch

18. How to make a new branch?

$ git branch <name1>

19. How to switch one branch to another branch?

$ git checkout <branch name>

20. How to push your branch to github?

$ git push origin <branch name>

0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x