How to delete a file from GitHub history without using commandline










1















I need to remove a file from history. I don't have commandline access to GitHub. Kindly help if this can done through UI itself.










share|improve this question






















  • You should have command line access. help.github.com/articles/…

    – BRjava
    Nov 13 '18 at 4:01















1















I need to remove a file from history. I don't have commandline access to GitHub. Kindly help if this can done through UI itself.










share|improve this question






















  • You should have command line access. help.github.com/articles/…

    – BRjava
    Nov 13 '18 at 4:01













1












1








1


1






I need to remove a file from history. I don't have commandline access to GitHub. Kindly help if this can done through UI itself.










share|improve this question














I need to remove a file from history. I don't have commandline access to GitHub. Kindly help if this can done through UI itself.







github






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 13 '18 at 3:47









vinod-dvinod-d

3414




3414












  • You should have command line access. help.github.com/articles/…

    – BRjava
    Nov 13 '18 at 4:01

















  • You should have command line access. help.github.com/articles/…

    – BRjava
    Nov 13 '18 at 4:01
















You should have command line access. help.github.com/articles/…

– BRjava
Nov 13 '18 at 4:01





You should have command line access. help.github.com/articles/…

– BRjava
Nov 13 '18 at 4:01












3 Answers
3






active

oldest

votes


















1














TO achieve this, you have to have command line access.
Delete file from history



But Using UI , you could delete the file from the repo (branch)
Ex:
enter image description here



Click the delete button on top right corner and commit.






share|improve this answer






























    1














    You can't delete the file from history, but you can delete it from the repository by following this help article



    Alternatively, you could do a cherry-picking using one of the Git GUIs software, then cherry-pick all the commits, except for the one that you wanted to removed, into a new branch. Then, delete the old branch.






    share|improve this answer

























    • @BRjava I have committed the file again removing the sensitive data. The issue is the sensitive data is still there in history. I want to remove that

      – vinod-d
      Nov 13 '18 at 5:31











    • @vinod-d I added another solution to my answer

      – Andreas
      Nov 13 '18 at 5:45


















    0














    You don't need command line access to GitHub, only to your own local clone, where you can:



    • either do a git filter-branch (example here)

    • or use BFG

    Then you git push --force.



    But the alternative, if you really don't want to use any command line, even locally... would be to contact GitHub support, asking them to remove the file from your remote repo history.

    That is a last resort option though, since you are supposed to be able to do that on your own.






    share|improve this answer






















      Your Answer






      StackExchange.ifUsing("editor", function ()
      StackExchange.using("externalEditor", function ()
      StackExchange.using("snippets", function ()
      StackExchange.snippets.init();
      );
      );
      , "code-snippets");

      StackExchange.ready(function()
      var channelOptions =
      tags: "".split(" "),
      id: "1"
      ;
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function()
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled)
      StackExchange.using("snippets", function()
      createEditor();
      );

      else
      createEditor();

      );

      function createEditor()
      StackExchange.prepareEditor(
      heartbeatType: 'answer',
      autoActivateHeartbeat: false,
      convertImagesToLinks: true,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: 10,
      bindNavPrevention: true,
      postfix: "",
      imageUploader:
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      ,
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      );



      );













      draft saved

      draft discarded


















      StackExchange.ready(
      function ()
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53273497%2fhow-to-delete-a-file-from-github-history-without-using-commandline%23new-answer', 'question_page');

      );

      Post as a guest















      Required, but never shown

























      3 Answers
      3






      active

      oldest

      votes








      3 Answers
      3






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      1














      TO achieve this, you have to have command line access.
      Delete file from history



      But Using UI , you could delete the file from the repo (branch)
      Ex:
      enter image description here



      Click the delete button on top right corner and commit.






      share|improve this answer



























        1














        TO achieve this, you have to have command line access.
        Delete file from history



        But Using UI , you could delete the file from the repo (branch)
        Ex:
        enter image description here



        Click the delete button on top right corner and commit.






        share|improve this answer

























          1












          1








          1







          TO achieve this, you have to have command line access.
          Delete file from history



          But Using UI , you could delete the file from the repo (branch)
          Ex:
          enter image description here



          Click the delete button on top right corner and commit.






          share|improve this answer













          TO achieve this, you have to have command line access.
          Delete file from history



          But Using UI , you could delete the file from the repo (branch)
          Ex:
          enter image description here



          Click the delete button on top right corner and commit.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Nov 13 '18 at 4:04









          BRjavaBRjava

          1,35711731




          1,35711731























              1














              You can't delete the file from history, but you can delete it from the repository by following this help article



              Alternatively, you could do a cherry-picking using one of the Git GUIs software, then cherry-pick all the commits, except for the one that you wanted to removed, into a new branch. Then, delete the old branch.






              share|improve this answer

























              • @BRjava I have committed the file again removing the sensitive data. The issue is the sensitive data is still there in history. I want to remove that

                – vinod-d
                Nov 13 '18 at 5:31











              • @vinod-d I added another solution to my answer

                – Andreas
                Nov 13 '18 at 5:45















              1














              You can't delete the file from history, but you can delete it from the repository by following this help article



              Alternatively, you could do a cherry-picking using one of the Git GUIs software, then cherry-pick all the commits, except for the one that you wanted to removed, into a new branch. Then, delete the old branch.






              share|improve this answer

























              • @BRjava I have committed the file again removing the sensitive data. The issue is the sensitive data is still there in history. I want to remove that

                – vinod-d
                Nov 13 '18 at 5:31











              • @vinod-d I added another solution to my answer

                – Andreas
                Nov 13 '18 at 5:45













              1












              1








              1







              You can't delete the file from history, but you can delete it from the repository by following this help article



              Alternatively, you could do a cherry-picking using one of the Git GUIs software, then cherry-pick all the commits, except for the one that you wanted to removed, into a new branch. Then, delete the old branch.






              share|improve this answer















              You can't delete the file from history, but you can delete it from the repository by following this help article



              Alternatively, you could do a cherry-picking using one of the Git GUIs software, then cherry-pick all the commits, except for the one that you wanted to removed, into a new branch. Then, delete the old branch.







              share|improve this answer














              share|improve this answer



              share|improve this answer








              edited Nov 13 '18 at 5:45

























              answered Nov 13 '18 at 3:58









              AndreasAndreas

              1,89221018




              1,89221018












              • @BRjava I have committed the file again removing the sensitive data. The issue is the sensitive data is still there in history. I want to remove that

                – vinod-d
                Nov 13 '18 at 5:31











              • @vinod-d I added another solution to my answer

                – Andreas
                Nov 13 '18 at 5:45

















              • @BRjava I have committed the file again removing the sensitive data. The issue is the sensitive data is still there in history. I want to remove that

                – vinod-d
                Nov 13 '18 at 5:31











              • @vinod-d I added another solution to my answer

                – Andreas
                Nov 13 '18 at 5:45
















              @BRjava I have committed the file again removing the sensitive data. The issue is the sensitive data is still there in history. I want to remove that

              – vinod-d
              Nov 13 '18 at 5:31





              @BRjava I have committed the file again removing the sensitive data. The issue is the sensitive data is still there in history. I want to remove that

              – vinod-d
              Nov 13 '18 at 5:31













              @vinod-d I added another solution to my answer

              – Andreas
              Nov 13 '18 at 5:45





              @vinod-d I added another solution to my answer

              – Andreas
              Nov 13 '18 at 5:45











              0














              You don't need command line access to GitHub, only to your own local clone, where you can:



              • either do a git filter-branch (example here)

              • or use BFG

              Then you git push --force.



              But the alternative, if you really don't want to use any command line, even locally... would be to contact GitHub support, asking them to remove the file from your remote repo history.

              That is a last resort option though, since you are supposed to be able to do that on your own.






              share|improve this answer



























                0














                You don't need command line access to GitHub, only to your own local clone, where you can:



                • either do a git filter-branch (example here)

                • or use BFG

                Then you git push --force.



                But the alternative, if you really don't want to use any command line, even locally... would be to contact GitHub support, asking them to remove the file from your remote repo history.

                That is a last resort option though, since you are supposed to be able to do that on your own.






                share|improve this answer

























                  0












                  0








                  0







                  You don't need command line access to GitHub, only to your own local clone, where you can:



                  • either do a git filter-branch (example here)

                  • or use BFG

                  Then you git push --force.



                  But the alternative, if you really don't want to use any command line, even locally... would be to contact GitHub support, asking them to remove the file from your remote repo history.

                  That is a last resort option though, since you are supposed to be able to do that on your own.






                  share|improve this answer













                  You don't need command line access to GitHub, only to your own local clone, where you can:



                  • either do a git filter-branch (example here)

                  • or use BFG

                  Then you git push --force.



                  But the alternative, if you really don't want to use any command line, even locally... would be to contact GitHub support, asking them to remove the file from your remote repo history.

                  That is a last resort option though, since you are supposed to be able to do that on your own.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Nov 13 '18 at 5:42









                  VonCVonC

                  838k29426513190




                  838k29426513190



























                      draft saved

                      draft discarded
















































                      Thanks for contributing an answer to Stack Overflow!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid


                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.

                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function ()
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53273497%2fhow-to-delete-a-file-from-github-history-without-using-commandline%23new-answer', 'question_page');

                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      Popular posts from this blog

                      Kleinkühnau

                      Makov (Slowakei)

                      Deutsches Schauspielhaus