5. clone -> copy repo to current
working directory
add -> track changes of the file or “.” to
track all files
commit -> save the changes
push -> upload the commits
pull -> download the changes (opposite of push)
init -> initialize the repository
7. git branch -> to check current branch
git checkout -b “branch_name” -> to
create a branch and switch to it
git checkout “branch_name” -> to
switch to a branch
8. Undoing in git
git branch -d “branch name”
git reset “file_name”
git reset HEAD~1 (for last commit)
*git log -> to see past commits and their hash
id
9. fork the repo from GDSC-AdtU/Intro-to-github
make a local directory
go to terminal
clone the repo from your account into the directory
$git clone "your forked repo link"
$git init
$git config --global user.name "your-user-name"
$git config --global user.email "username@mail.com"
$cd "to-the-cloned-folder"
10. git checkout -b "your-branch-name"
*make-your-changes to the file
git add "modified-file-name"
git commit -m "added your-name"
git remote add origin "your forked repo link"
git remote add upstream "original repo link"
git push origin -u "your-branch-name"
go to github user interface and click to "compare and pull
request"
click on "create pull request"
done :)