Tell me how to do it right: I clone a remote repository (project build template), then I work with it, creating a new project, changes are coming, but I need to commit to my repository (my project), how to do it correctly?

    2 answers 2

    If you have cloned from GitHub, BitBucket or another similar service and now you want to get your remote repository, then the most convenient way is to go this way.

    1. You need to register on the service.
    2. Create a fork for the repository of interest. enter image description here
    3. Now you have your own copy of the remote repository associated with the original one. Clone this copy.

    Now you can save commits to your local repository, and then push them to your remote . If you want to suggest your changes to the original repository, for this there is a special tool called pull-request or merge-request (pull request, merge-request) .

    More on this:

      You make commits with the git commit command to your local repository located in the .git directory.

      moreover: the git program cannot commit commits anywhere other than your local repository.


      Yes, you can later send changes to your local repository to some other repository (to which you have write access). but that's another story.