Skip to content

Instantly share code, notes, and snippets.

@miguelitodev
Last active October 12, 2020 19:05
Show Gist options
  • Save miguelitodev/4cd93fd86751924c2c4fd3b3c873ad91 to your computer and use it in GitHub Desktop.
Save miguelitodev/4cd93fd86751924c2c4fd3b3c873ad91 to your computer and use it in GitHub Desktop.

First git push in a new remote repository

  • git init
  • git add .
  • git commit -m "first commit"
  • git branch -M main
  • git remote add origin https://{website-of-repository}/{username}/{name-repository}.git
  • git push -u origin main

Committing after the first commit

  • git add .
  • git commit -m "title of commit" -m "description od commit"
  • git push

How to make a pull request

  • fork the repository you will pull request
  • make the git clone on your machine
  • after the changes give this command
    • git checkout -b branch-name
    • branch-name -> put something that describes what you're working on
  • if you want to go back to the master, execute this command
    • git checkout master
  • now let's add all the changes we made with the -A flag
    • git add -A
  • then just give a git commit
    • git commit -m "title of commit" -m "description od commit"
  • And finally just push
    • git push --set-upstream origin nova-branch
@ThiagoBibiano
Copy link

Great!

@miguelitodev
Copy link
Author

Great!

thanks!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment