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

git_notes

Git is a free, open-source version control tool that manages code changes, while GitHub is a platform for storing and managing code using Git. Users can configure Git, clone repositories, check status, and commit changes through various terminal commands. Key commands include 'git add' for staging files, 'git commit' for finalizing changes, and 'git push' for uploading local changes to a remote repository.
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views

git_notes

Git is a free, open-source version control tool that manages code changes, while GitHub is a platform for storing and managing code using Git. Users can configure Git, clone repositories, check status, and commit changes through various terminal commands. Key commands include 'git add' for staging files, 'git commit' for finalizing changes, and 'git push' for uploading local changes to a remote repository.
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

Git is version control tool which manage the changes in code.

why git?
-> it is free, open source, fast, scalable.
GitHub:
github is plactform which allows the user to store and manage their code using git.
website url:https://github.com
NOTE: in github we call folders as repositorys(shortcut name: repo). make changes
to final in github is called commit.
--> first we have to install git bash in windows or mac git is already installed
--> secound we have to open git bash and follow the configuring git
1) git config --global user.name "enter your git user name"
2) git config --global user.email "enter your email login through the git"
3) git config --list (which give's your details:))
STEPS IN HAVE DONE:
--> first i created a folder and open throught the vscode
--> secound i opened terminal
{
CLONE & STATUS:
Clone: cloning a repository on our local machine
how? git clone <-some link->
Status: it displays the status of the code.
how? git status
commands in terminals:
1) ls (give the list of the files)
2) ls -Force or Get-ChildItem -Force (gives the list of hiden files also)
After modifying the code you have add and then commit (it must)
[git status:
i)untracked : new files that git doesn't yet track.
ii)modified : changed
iii)staged : file is ready to commit
iv)unmodified : unchanged]
when we add by using terminal it becomes staged(means it is ready to commit)
when to add? when the file is modified or untracked
add: adds new or changed files in your working directory to the git staging area
how? git add <-file_name->
if there are multiple files to add then we use git add .{it adds all files}
commit: it is the ready of change
how? git commit -m "some message"
PUSH COMMAND/
push - upload local repo content to remote repo
how? git push origin main

You might also like