Announcement

Collapse
No announcement yet.

GitPush - Push your commits directly through the editor

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [PLUGIN] GitPush - Push your commits directly through the editor

    Hello everyone!
    I made an plugin for our loved Unreal Engine 4 Editor. As some of you know, Unreal has great Source control features, and in the 4.9 release, they added Git source control support (which is still beta, but works fine!). So, with that, adding and commiting assets works pretty fine, but to push the commits onto your preferred Git server, you need to use the normal Windows cmd / some other Git GUI tools. I thought it would be better to have the functionality ready-to-use in the UnrealEd. So I made a plugin for that! Let's call it GitPush.
    However, this needs some things you need to know first:
    • You obviously need a git.exe binary, but I bet you have that already
    • The path to this binary needs to be in Windows' PATH environment variable (A simple test to see if thats working is to open up a new cmd and type in 'git'. If it shows you help on the command, everything is fine, if not, you need to put the path to git.exe in the environment variable (simple explanation below!))
    • Your projects needs to have a git repo already set up (if not the plugin shows you hints just FYI)
    • The plugin only supports Git connections via SSH, but that shouldn't be a problem
    • If you change something to the git information (e.g. creating / changing branches, adding / removing remote hosts) you need to restart the editor so GitPush recognizes the changes


    If you have a repo set up, with a master branch and remote server, you can use GitPush! Once in the editor, just click on the new button in the Viewport Toolbar. From there, go to the branch you want to push to, and then the remote host server you want to push to. (Note: Unreals Source control feature commits things on the master branch, however, if you select another branch to push to, it just copies the commit from the master to the selected branch).

    A simple workthrough on how to create and initialize the Git connection between a service (in this case GitHub) and Unreal:
    1. Make sure you have a SSH-key linked to your computer with your GitHub profile (click here for more information)
    2. Make also sure that you enabled Source control in the engine and filled out the nessecary information (more info)
    3. Create a new repo at GitHub
    4. Copy the SSH adress by choosing "SSH" in the drop-down above the file list (should read "HTTPS" before)
    5. In your project folder, open up a new command prompt window and type in git init. This initializes the project folder to be a local git folder.
    6. Pull all files from your created Git repo (should be empty, maybe it contains a README.MD) with git pull yourCopiedSSHadress. When you did step 1 right, it should download files from the repo your local folder should now contain the files from the repo + all your Unreal files.
    7. You can test whether git sees all new files by typing in git status. This should show you all files which are not in the repo (so all your Unreal project files).
    8. Now, you have the repo in your folder (the important part is the .git folder in your project folder), and my plugin sees the branch "master", because thats the default one, but it will tell you that you don't have any remote host. The remote host is the server you upload new changes to, and thats obviously GitHub aswell.
    9. Back in the command prompt, type in git remote add someName yourCopiedSSHadress. In most cases we use "origin" as the remote name and this remote host will be the repo's SSH adress.
    10. This shouldn't return anything.. You can check if the host is there by using git remote. This should list you the host you created.
    11. Now, just (re)start the Editor and hit the GitPush button. You should now see the master branch in the dropdown, and when you select that you should see the remote host's name. Clicking the hostname will then push files to the repo, if there are files to push, obviously.


    Download (tested 4.10.4):
    Click here
    Source code: Click here

    Some images:
     
    Spoiler


    If you have questions, bugs, or anything else, feel free to comment them here
    I hoped I helped some devs to do their work more efficient

    Have a nice day ❤
    48
    Good idea, good plugin!
    95.83%
    46
    No, i don't like it.
    0%
    0
    Meh, not sure.
    4.17%
    2
    Last edited by iUltimateLP; 02-23-2016, 02:11 PM.
    Hobby game developer from Germany Follow me on Twitter!
    Stuff I made:
    Steam Workshop Tutorial/Wiki
    Making a full working translation for your game and change it at runtime

    #2
    Wow amazing ;D Nice job!

    Comment


      #3
      Originally posted by DropMotion View Post
      Wow amazing ;D Nice job!
      Thanks for feedback!
      Hobby game developer from Germany Follow me on Twitter!
      Stuff I made:
      Steam Workshop Tutorial/Wiki
      Making a full working translation for your game and change it at runtime

      Comment


        #4
        This will make git commit and pushing in life or death situations much better



        Looks awesome

        Comment


          #5
          Nice, this feature is awesome, I will definitely try this!

          For long term, I would prefer to extend the official Source Control Provider of the Engine, but I didn't find the time for this before, so this is very welcome
          [Gamedev programmer at Darewise (Paris) - We are hiring]
          UE4 Git LFS 2.x Source Control Plugin 2.14-beta for UE4.23 - (v1 integrated by default since UE4.7)
          UE4 Plastic SCM Source Control Plugin 1.4.6 for UE4.23 - (integrated by default in Beta status since UE4.24)

          Comment


            #6
            Originally posted by SRombauts View Post
            Nice, this feature is awesome, I will definitely try this!

            For long term, I would prefer to extend the official Source Control Provider of the Engine, but I didn't find the time for this before, so this is very welcome
            Wow you were the guy who brought Git inside UE4 When I started, it was planned for a PR for the engine, but I hadn't the time to toy around with the github version here, so If you have, feel free to use my code, because I think it's nothing which you couldn't have done...
            Hobby game developer from Germany Follow me on Twitter!
            Stuff I made:
            Steam Workshop Tutorial/Wiki
            Making a full working translation for your game and change it at runtime

            Comment


              #7
              Originally posted by iUltimateLP View Post
              feel free to use my code, because I think it's nothing which you couldn't have done...
              It is often the case that we have a lot of idea, could make them realities, but just lack the time or the energy.
              I will try to take that time at some point in the future
              [Gamedev programmer at Darewise (Paris) - We are hiring]
              UE4 Git LFS 2.x Source Control Plugin 2.14-beta for UE4.23 - (v1 integrated by default since UE4.7)
              UE4 Plastic SCM Source Control Plugin 1.4.6 for UE4.23 - (integrated by default in Beta status since UE4.24)

              Comment


                #8
                Hi iUltimateLP, just to let you know that I've just released a new version of the standalone Git plugin with the Push operation in Source Control Menu

                I will also propose this as a Merge Request, for UE4.20 hopefully.

                Enjoy!
                [Gamedev programmer at Darewise (Paris) - We are hiring]
                UE4 Git LFS 2.x Source Control Plugin 2.14-beta for UE4.23 - (v1 integrated by default since UE4.7)
                UE4 Plastic SCM Source Control Plugin 1.4.6 for UE4.23 - (integrated by default in Beta status since UE4.24)

                Comment


                  #9
                  Hi SRombauts,
                  nothing news about the integration inside the last release (4.20) ? Always recommande to used the plugin integrate or your last release has stable ?
                  Portfolio Art Station

                  Comment


                    #10
                    Hi stilobique (bonjour Aurélien)

                    No unfortunately nothing new, I've got a new job at Darewise (Paris) and am very busy doing other (Unreal) stuffs.

                    But it's still my intention to upgrade the integrated plugin with the Push feature from my standalone "dev" plugin!

                    edit: you can use either version of the plugin (integrated v1 or standalone dev v2) the dev one being more feature rich
                    [Gamedev programmer at Darewise (Paris) - We are hiring]
                    UE4 Git LFS 2.x Source Control Plugin 2.14-beta for UE4.23 - (v1 integrated by default since UE4.7)
                    UE4 Plastic SCM Source Control Plugin 1.4.6 for UE4.23 - (integrated by default in Beta status since UE4.24)

                    Comment


                      #11
                      What does this plugin benefit in contrast to git CLI?
                      Please explain it with a bit more info...
                      I will do appreciate it!

                      Comment


                        #12
                        Originally posted by EminentEIement View Post
                        What does this plugin benefit in contrast to git CLI?
                        Please explain it with a bit more info...
                        I will do appreciate it!
                        Probably nothing. It's just that you can git push from within the editor.
                        Give me something to believe in.

                        Comment

                        Working...
                        X