Skip to content

Instantly share code, notes, and snippets.

@itsyosefali
Last active November 24, 2023 11:54
Show Gist options
  • Select an option

  • Save itsyosefali/f01b774815ae3a0253bfc984cd3c2587 to your computer and use it in GitHub Desktop.

Select an option

Save itsyosefali/f01b774815ae3a0253bfc984cd3c2587 to your computer and use it in GitHub Desktop.
cd Desktop
#create file for the git.
mkdir <file name>
cd <file name>
# start git in the file
git init
# connect with your github account
git config --global user.email <your email>
git config --global user.name <user name>
git add . / git add <file.txt name>
git commit /git commit -m "added ReadMe.txt"
git status
#new branch
git checkout -b <name of branch>
git add .
git commit -m "first commet on new branch"
# to merge your branch with anthoer branch
git merge master
# when you want to upload to the repo in github
git remote add origin https://github.com/<youremail>/<filename.git>
# from your file to the repo in github
git push -u origin <branch name>
# from the repo to your file
git pull origin main
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment