Git and Github Notes
Git and Github Notes
This is central version system system.But git is distributive version system.in distributive version
system individual tracking of system is possible but in git individual tracking of system is not possible.
GIT VS GITHUB
GITHUB INSTALLATION AND CREATION OF ACCOUNT
GIT TRACKS THE PROGRAM IN LOCAL SYSTEM BUT GITHUB IS CONNECTING THE PROGRAM IN
INTERNET WHICH MAKES THE DEVLOPERS LIFE EASY
Github->signup->email->password->username->solve the puzzle 😊->enter verification code
Now git starts to track the repository.a hidden file is created to see it you need to see hiddent items
To see the hidden git file enter view and click hidden items
Here index .html is an untracked file which means it is not tracked by git
And we have added certain commands in index.html page(simply modified index.html file)
Git add . is used to add all instead of specifying name for each file
How to upload github projects
Till now we have done local repository of git but now we are going to do remote repository which is
The projects which we create till now are available in local repository but to integrate in a team the
repository should be in internet
y
Push an existing repository is to be used as we need to push our existing repository in github
Now again in our local repository we created a new git tracking repository now we need to push
these in GITHUB.
An authentication comes when we are pushing local repository to remote repository
Changed
This is thorugh collaborators
Here through this token option and this will be given by repo owner
We have pulled the change and now we are pushing the changes we are going to make into github
Here 3 commits are there in local but in remote repository only 2 are there
Changes in remote to local->pull
Obvioslu when git is initialised we don’t want some files to be tracked by git so using git git ignore we
ignore those files
Difference between /node_module(root directory) and node_module/(any path)
Subfolder creating temp shes creating and then you need to keep temp/ to ignore it
Here we go to a github project and see its read me and see what is meant by readme
Read me is nothing but it’s a description of project kind of thing it’s a file with extension with md 😊
Everytime we commit an id is generated here food app an index.html file is generated and header tag
is added
This is commited in git nd then I changed it
This is footer is added and style .css is linked to this css file
We need to see the difference between two commits
Click commit there click ok if its not working then kill process
What happens is live users keep using the application and we shouldn’t disturb the live code so we
need to make a branch and work on it and then merge once the testing is over 😊
but if I change master branch and then try to merge then I get some conflicts 😊 😊
Why ☹
Because after creating branch and changing content then trying to merge nothng does happen 😊
If after deleting test 1 and creating new file called as test 2 and then commition in main branch then I
am trying to merge dev branch with main branch then I get a error 😐
GIT PULL
Git merging in local repo is different from git merging in remote repository
This repo clone create new branch change it and then lets create a pull request
To get remote repo branches click -a
Clone and we will create a new branch
Creating a new file called products .html
GIT FORK 😊
100s cant get token
Added signup