Skip to content

Instantly share code, notes, and snippets.

@enamcse
Last active May 27, 2017 23:04
Show Gist options
  • Save enamcse/ed47e8261fbabda9142051c675e2497d to your computer and use it in GitHub Desktop.
Save enamcse/ed47e8261fbabda9142051c675e2497d to your computer and use it in GitHub Desktop.
How to push something in a new repository.

After creating a repository in GitHub, we have to give the following command in git Bash to push the local repository to global.

git init
git add .
git commit -m "Commit Summary"
git remote add origin https://github.com/enamcse/******.git
git push -u origin master

If the last command does not work, we have to force update by the following command:

git push -f origin master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment