⊗gtPmRmSD 57 of 65 menu

Pushing data to an remote repository in Git

Let's prepare and push our first commit to our test remote repository on GitHub.

Let's create a file test.txt and index it:

git add test.txt

Let's commit:

git commit -m "first commit"

Now let's send our commit to an remote repository. To do this, use the push command, in which after the -u flag, the name of the remote repository and the name of the branch we are sending are specified after a space:

git push -u origin master

After executing the command, the terminal will ask you to enter your GitHub login and the token we created in the previous lessons (you only need to enter it the first time). After entering the token, all your commits that are not yet on the server will be sent.

If you then go to your project on GitHub, you will see files with your code there.

Make your first commit to your project and push it to an remote repository. Find your project on GitHub and make sure the changes appear there.

Make changes to the project. Make a few more commits. Push your changes to an remote repository.

English
БеларускаяDeutschEspañolFrançaisPortuguêsРусский
We use cookies for website operation, analytics, and personalization. Data processing is carried out in accordance with the Privacy Policy.
accept all customize decline