Git/Github
"Demystifying Git and GitHub: A Comprehensive Guide to Version Control and Collaborative Development"
This article will provide a thorough understanding of both Git and GitHub, making it accessible to both beginners and those looking to deepen their knowledge.
Save,Reshare GitHub
Basic Steps:-
Check your setup?
Basic Commands to check status/log
Process-1
Set Gihub account?
Create your Repository: Test1
Copy Test1 in your local folder(directories) your?
$ git clone …..https_link……
$ ls -a
?You will find .git file
Add new file or update existing file any file
Go for Staging Area
$ git add .
Go for commit (local git repository commit)
$ git commit -m “first commit”
Push to Github
$ git push origin main
?
Process-2
Create local repository first and create one file
Initialize git?
$ git init
$ ls -a
?You will find .git file
Add new file or update existing file any file
Go for Staging Area
$ git add .
Go for commit (local git repository commit)
$ git commit -m “first commit”
Link to your github repository
$ git remote add origin https://github.com/OWNER/REPOSITORY.git
Check your setup
$ git remote -v
Push to Github
$ git push origin main
Branching and Merging
Create New Branch
Delete any branch
Switch to any branch
Rest all processes are same for git add/commit/push
We can merge two branches with/without conflict using pull request