How can I give up local commit in Github in Android Studio? The 2019 Stack Overflow Developer Survey Results Are InHow to modify existing, unpushed commits?How to undo 'git add' before commit?How do I undo the most recent commits in Git?How do I force “git pull” to overwrite local files?How do I check out a remote Git branch?How do I delete a Git branch locally and remotely?How to change the URI (URL) for a remote Git repository?How do I push a new local branch to a remote Git repository and track it too?How to revert a Git repository to a previous commitHow do I rename a local Git branch?

Dual Citizen. Exited the US on Italian passport recently

What is the use of option -o in the useradd command?

On the insanity of kings as an argument against Monarchy

What does "sndry explns" mean in one of the Hitchhiker's guide books?

Why is it "Tumoren" and not "Tumore"?

is usb on wall sockets live all the time with out switches off

What do the Banks children have against barley water?

If the Wish spell is used to duplicate the effect of Simulacrum, are existing duplicates destroyed?

Spanish for "widget"

What is the motivation for a law requiring 2 parties to consent for recording a conversation

Where to refill my bottle in India?

I looked up a future colleague on linkedin before I started a job. I told my colleague about it and he seemed surprised. Should I apologize?

Are there any other methods to apply to solving simultaneous equations?

Why do UK politicians seemingly ignore opinion polls on Brexit?

Is three citations per paragraph excessive for undergraduate research paper?

How to answer pointed "are you quitting" questioning when I don't want them to suspect

How can I create a character who can assume the widest possible range of creature sizes?

Feasability of miniature nuclear reactors for humanoid cyborgs

Should I write numbers in words or as numerals when there are multiple next to each other?

How to make payment on the internet without leaving a money trail?

"Riffle" two strings

Why isn't airport relocation done gradually?

Does a dangling wire really electrocute me if I'm standing in water?

Is there a name of the flying bionic bird?



How can I give up local commit in Github in Android Studio?



The 2019 Stack Overflow Developer Survey Results Are InHow to modify existing, unpushed commits?How to undo 'git add' before commit?How do I undo the most recent commits in Git?How do I force “git pull” to overwrite local files?How do I check out a remote Git branch?How do I delete a Git branch locally and remotely?How to change the URI (URL) for a remote Git repository?How do I push a new local branch to a remote Git repository and track it too?How to revert a Git repository to a previous commitHow do I rename a local Git branch?



.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








-1















I use Github in my project. I do the error commit in locally, they are "Submit 4 Error" and "Submit 5 Error".



I hope to give up the two error local commit, and don't push the two error commit to remote repository, how can I do in Android Studio?



Figure



enter image description here










share|improve this question




























    -1















    I use Github in my project. I do the error commit in locally, they are "Submit 4 Error" and "Submit 5 Error".



    I hope to give up the two error local commit, and don't push the two error commit to remote repository, how can I do in Android Studio?



    Figure



    enter image description here










    share|improve this question
























      -1












      -1








      -1








      I use Github in my project. I do the error commit in locally, they are "Submit 4 Error" and "Submit 5 Error".



      I hope to give up the two error local commit, and don't push the two error commit to remote repository, how can I do in Android Studio?



      Figure



      enter image description here










      share|improve this question














      I use Github in my project. I do the error commit in locally, they are "Submit 4 Error" and "Submit 5 Error".



      I hope to give up the two error local commit, and don't push the two error commit to remote repository, how can I do in Android Studio?



      Figure



      enter image description here







      git android-studio github






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 8 at 8:27









      HelloCWHelloCW

      162432102




      162432102






















          1 Answer
          1






          active

          oldest

          votes


















          1














          If you mean TOTALLY discard those two commits (WARNING: YOU WILL LOSE THE CODE ENTIRELY!), you can use git reset --hard on that commit.



          Right click on the last commit you want to keep (for your picture, Submit 3), Reset Current Branch to Here... -> Hard.






          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%2f55059304%2fhow-can-i-give-up-local-commit-in-github-in-android-studio%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            1














            If you mean TOTALLY discard those two commits (WARNING: YOU WILL LOSE THE CODE ENTIRELY!), you can use git reset --hard on that commit.



            Right click on the last commit you want to keep (for your picture, Submit 3), Reset Current Branch to Here... -> Hard.






            share|improve this answer





























              1














              If you mean TOTALLY discard those two commits (WARNING: YOU WILL LOSE THE CODE ENTIRELY!), you can use git reset --hard on that commit.



              Right click on the last commit you want to keep (for your picture, Submit 3), Reset Current Branch to Here... -> Hard.






              share|improve this answer



























                1












                1








                1







                If you mean TOTALLY discard those two commits (WARNING: YOU WILL LOSE THE CODE ENTIRELY!), you can use git reset --hard on that commit.



                Right click on the last commit you want to keep (for your picture, Submit 3), Reset Current Branch to Here... -> Hard.






                share|improve this answer















                If you mean TOTALLY discard those two commits (WARNING: YOU WILL LOSE THE CODE ENTIRELY!), you can use git reset --hard on that commit.



                Right click on the last commit you want to keep (for your picture, Submit 3), Reset Current Branch to Here... -> Hard.







                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited Mar 8 at 10:20









                Zoe

                13.4k85386




                13.4k85386










                answered Mar 8 at 9:10









                Geno ChenGeno Chen

                2,75161125




                2,75161125





























                    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%2f55059304%2fhow-can-i-give-up-local-commit-in-github-in-android-studio%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

                    AWS Lex not identifying response if by a variable The 2019 Stack Overflow Developer Survey Results Are In Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) The Ask Question Wizard is Live! Data science time! April 2019 and salary with experienceEnforcing custom enumeration in AWS LEX for slot valuesHow to give response based on user response in Amazon Lex?Intercepting AWS Lambda Response to a AWS Lex QueryLex chat bot error: Reached second execution of fulfillment lambda on the same utteranceamazon lex showing invalid responseLambda response send back to Lex slot?Response card in Amazon lexAmazon Lex - Lambda response return HTML to botHow can I solve 424 (Failed Dependency) (python) obtained from Amazon lex?

                    Алба-Юлія

                    Захаров Федір Захарович