Github - no command line

    Sometimes, while exploring other people's repositories on github, you notice errors, inaccuracies, or you realize that you could add something useful, but if you need to perform a bunch of actions on the command line, it might scare someone, it’s not available to someone at the moment, and we pass by.

    Many experienced github users know that it’s by no means necessary to use the command line for everything. All this is so.

    Here I have compiled several recipes, using which you can copy the repository yourself, create an auxiliary branch there, edit something in it, add / delete files / folders, make a pull request to the original repository. And after some time, when changes in the original repository that are not reflected in our copy accumulate - synchronize these two repositories - and also without a single git command.

    I think with the creation of a fork (copying the repository to yourself) - everyone can easily cope, so we’ll go further.

    Create a branch

    It is considered a sign of good taste if you place your edits in a separate branch, because the owner of the original repository may ask you to change / modify something before merging.

    You can create a new branch (by copying from the current one) right in the branch change window. Enter the name - enter - done.

    Adding Files

    Creating new files here - no need to go far. Click "+"

    And immediately go to edit mode of the newly created file:

    Here you can edit the file itself and its name. There is one interesting feature in editing a name - using '/' and '../' you can navigate through the directory tree. (as a result, when creating the file, folders that did not exist before this will be created)

    Fork synchronization with the main repository

    It often happens that we fork the repository, edit something there, do a pull-request. The author accepts this pull-request and we calm down for a while. After a couple of months, we again want to improve something, but our copy is already hopelessly outdated. This requires synchronization. You can easily find how to do this using the command line. An explanation of how to do this directly on github is much less common.

    • open your fork on github
    • go to the list of his pull-requests
    • click “New Pull Request”, by default github takes the original repository as the base and compares ours with it, but we need the other way around
    • click “switching the base”, (if we edited something in our copy, you need to click Edit, and manually change the base) - we’ll immediately see everything that was recently added to the original repository
    • click “Create Pull-request”, give it some friendly name, such as “Update from original”
    • click "Send pull request"
    • click "Merge pull request" and confirm this action - all

    So many points, you say - I agree, it looks bulky in the form of a list, try the video - only 53 seconds. I myself, having tried it all once, immediately remembered and began to use it.

    I did not begin to describe the obvious things here: how to fork, how to make pull-request - since they are done in 1 click.

    And what else of the non-obvious can be done with turnips without using the command line?

    Also popular now: