how to associate the already checked in(pushed) code with a work item in a GIT2019 Community Moderator ElectionHow to modify existing, unpushed commits?How to remove local (untracked) files from the current Git working tree?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 both locally and remotely?Undo a Git merge that hasn't been pushed yetHow 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?

What would be the most expensive material to an intergalactic society?

Marriage green card at end of current visa with 2 Year residency requirement waiver in-process, question

Why would one plane in this picture not have gear down yet?

Virginia employer terminated employee and wants signing bonus returned

Possible answer to the Heaven Hell Door riddle

Is this Paypal Github SDK reference really a dangerous site?

How to secure an aircraft at a transient parking space?

Does "Until when" sound natural for native speakers?

How to draw cubes in a 3 dimensional plane

Doesn't allowing a user mode program to access kernel space memory and execute the IN and OUT instructions defeat the purpose of having CPU modes?

How can I ensure my trip to the UK will not have to be cancelled because of Brexit?

Conservation of Mass and Energy

Can one live in the U.S. and not use a credit card?

bad quality map when exporting as PDF

Why doesn't this Google Translate ad use the word "Translation" instead of "Translate"?

Having the player face themselves after the mid-game

If I receive a SOS signal, what is the proper response?

Coax or bifilar choke

Are there historical instances of the capital of a colonising country being temporarily or permanently shifted to one of its colonies?

Recommendation letter by significant other if you worked with them professionally?

When traveling to Europe from the US, do I need to purchase a different power strip?

Accepted offer letter, position changed

Rewrite the power sum in terms of convolution

How are showroom/display vehicles prepared?



how to associate the already checked in(pushed) code with a work item in a GIT



2019 Community Moderator ElectionHow to modify existing, unpushed commits?How to remove local (untracked) files from the current Git working tree?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 both locally and remotely?Undo a Git merge that hasn't been pushed yetHow 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?










0















I have already pushed the code without associating with a work item(defect id) raised in git but forgot to associate code changes with a work item in a GIT. how will I edit that push and associate with defect id now?










share|improve this question






















  • Possible duplicate of How to modify existing, unpushed commits?

    – phd
    Mar 7 at 8:55











  • stackoverflow.com/search?q=%5Bgit%5D+how+to+edit+commit

    – phd
    Mar 7 at 8:55















0















I have already pushed the code without associating with a work item(defect id) raised in git but forgot to associate code changes with a work item in a GIT. how will I edit that push and associate with defect id now?










share|improve this question






















  • Possible duplicate of How to modify existing, unpushed commits?

    – phd
    Mar 7 at 8:55











  • stackoverflow.com/search?q=%5Bgit%5D+how+to+edit+commit

    – phd
    Mar 7 at 8:55













0












0








0








I have already pushed the code without associating with a work item(defect id) raised in git but forgot to associate code changes with a work item in a GIT. how will I edit that push and associate with defect id now?










share|improve this question














I have already pushed the code without associating with a work item(defect id) raised in git but forgot to associate code changes with a work item in a GIT. how will I edit that push and associate with defect id now?







git






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Mar 7 at 6:25









Tamal DasTamal Das

112




112












  • Possible duplicate of How to modify existing, unpushed commits?

    – phd
    Mar 7 at 8:55











  • stackoverflow.com/search?q=%5Bgit%5D+how+to+edit+commit

    – phd
    Mar 7 at 8:55

















  • Possible duplicate of How to modify existing, unpushed commits?

    – phd
    Mar 7 at 8:55











  • stackoverflow.com/search?q=%5Bgit%5D+how+to+edit+commit

    – phd
    Mar 7 at 8:55
















Possible duplicate of How to modify existing, unpushed commits?

– phd
Mar 7 at 8:55





Possible duplicate of How to modify existing, unpushed commits?

– phd
Mar 7 at 8:55













stackoverflow.com/search?q=%5Bgit%5D+how+to+edit+commit

– phd
Mar 7 at 8:55





stackoverflow.com/search?q=%5Bgit%5D+how+to+edit+commit

– phd
Mar 7 at 8:55












2 Answers
2






active

oldest

votes


















0














Assuming this is your last commit, the way I usually do is first take a copy of your local folder in case things goes south.



  1. Undo last commit. git reset HEAD~1

  2. Add a new commit with all changes.

  3. Push new branch with force overwriting the remote git push -f

p.s. Depending on git server that you use, you might need additional permission for this.






share|improve this answer






























    0














    git rebase -i "commit hash you want to change



    This will open your default editor (usually vi) with a list of commits and actions for each one. By default, the action is pick.



    For any commit you wish to change the message, change pick to reword.



    Save and quit (in vi: :wq).



    For each such commit, you'll get an editor to edit the commit message. Change it as you see fit, save and quit.



    Once you're done editing all the commit messages, you'll return to the command prompt, and have a new tree with the updated messages.



    You can now upload them to github by using git push origin --force.



    If you just need to fix your last commit, you can replace steps 1-4 with git commit --amend.






    share|improve this answer








    New contributor




    Anugeetha V is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.



















      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%2f55037313%2fhow-to-associate-the-already-checked-inpushed-code-with-a-work-item-in-a-git%23new-answer', 'question_page');

      );

      Post as a guest















      Required, but never shown

























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      0














      Assuming this is your last commit, the way I usually do is first take a copy of your local folder in case things goes south.



      1. Undo last commit. git reset HEAD~1

      2. Add a new commit with all changes.

      3. Push new branch with force overwriting the remote git push -f

      p.s. Depending on git server that you use, you might need additional permission for this.






      share|improve this answer



























        0














        Assuming this is your last commit, the way I usually do is first take a copy of your local folder in case things goes south.



        1. Undo last commit. git reset HEAD~1

        2. Add a new commit with all changes.

        3. Push new branch with force overwriting the remote git push -f

        p.s. Depending on git server that you use, you might need additional permission for this.






        share|improve this answer

























          0












          0








          0







          Assuming this is your last commit, the way I usually do is first take a copy of your local folder in case things goes south.



          1. Undo last commit. git reset HEAD~1

          2. Add a new commit with all changes.

          3. Push new branch with force overwriting the remote git push -f

          p.s. Depending on git server that you use, you might need additional permission for this.






          share|improve this answer













          Assuming this is your last commit, the way I usually do is first take a copy of your local folder in case things goes south.



          1. Undo last commit. git reset HEAD~1

          2. Add a new commit with all changes.

          3. Push new branch with force overwriting the remote git push -f

          p.s. Depending on git server that you use, you might need additional permission for this.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Mar 7 at 6:37









          Lolitha RatnayakeLolitha Ratnayake

          1762319




          1762319























              0














              git rebase -i "commit hash you want to change



              This will open your default editor (usually vi) with a list of commits and actions for each one. By default, the action is pick.



              For any commit you wish to change the message, change pick to reword.



              Save and quit (in vi: :wq).



              For each such commit, you'll get an editor to edit the commit message. Change it as you see fit, save and quit.



              Once you're done editing all the commit messages, you'll return to the command prompt, and have a new tree with the updated messages.



              You can now upload them to github by using git push origin --force.



              If you just need to fix your last commit, you can replace steps 1-4 with git commit --amend.






              share|improve this answer








              New contributor




              Anugeetha V is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
              Check out our Code of Conduct.
























                0














                git rebase -i "commit hash you want to change



                This will open your default editor (usually vi) with a list of commits and actions for each one. By default, the action is pick.



                For any commit you wish to change the message, change pick to reword.



                Save and quit (in vi: :wq).



                For each such commit, you'll get an editor to edit the commit message. Change it as you see fit, save and quit.



                Once you're done editing all the commit messages, you'll return to the command prompt, and have a new tree with the updated messages.



                You can now upload them to github by using git push origin --force.



                If you just need to fix your last commit, you can replace steps 1-4 with git commit --amend.






                share|improve this answer








                New contributor




                Anugeetha V is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.






















                  0












                  0








                  0







                  git rebase -i "commit hash you want to change



                  This will open your default editor (usually vi) with a list of commits and actions for each one. By default, the action is pick.



                  For any commit you wish to change the message, change pick to reword.



                  Save and quit (in vi: :wq).



                  For each such commit, you'll get an editor to edit the commit message. Change it as you see fit, save and quit.



                  Once you're done editing all the commit messages, you'll return to the command prompt, and have a new tree with the updated messages.



                  You can now upload them to github by using git push origin --force.



                  If you just need to fix your last commit, you can replace steps 1-4 with git commit --amend.






                  share|improve this answer








                  New contributor




                  Anugeetha V is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.










                  git rebase -i "commit hash you want to change



                  This will open your default editor (usually vi) with a list of commits and actions for each one. By default, the action is pick.



                  For any commit you wish to change the message, change pick to reword.



                  Save and quit (in vi: :wq).



                  For each such commit, you'll get an editor to edit the commit message. Change it as you see fit, save and quit.



                  Once you're done editing all the commit messages, you'll return to the command prompt, and have a new tree with the updated messages.



                  You can now upload them to github by using git push origin --force.



                  If you just need to fix your last commit, you can replace steps 1-4 with git commit --amend.







                  share|improve this answer








                  New contributor




                  Anugeetha V is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.









                  share|improve this answer



                  share|improve this answer






                  New contributor




                  Anugeetha V is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.









                  answered Mar 7 at 6:39









                  Anugeetha VAnugeetha V

                  11




                  11




                  New contributor




                  Anugeetha V is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.





                  New contributor





                  Anugeetha V is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.






                  Anugeetha V is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.



























                      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%2f55037313%2fhow-to-associate-the-already-checked-inpushed-code-with-a-work-item-in-a-git%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

                      Thal And Out Agency railway station See also References External links Navigation menuOfficial Web Site of Pakistan RailwaysArchivedOfficial Web Site of Pakistan Railwayseeexpanding ite

                      Posting a File and Associated Data to a RESTful WebService preferably as JSON2019 Community Moderator ElectionREST URI convention - Singular or plural name of resource while creating itUploading both data and files in one form using Ajax?How do I upload a file with metadata using a REST web service?REST API - file (ie images) processing - best practicesSpring: JSON data and file in the same requestREST API Put large dataPosting a file and JSON data to Spring rest serviceRESTful Web Service Upload/Download Large Data With JSONREST API Design sending JSON data and a file to the api in same requestPost JSONArray to REST servicePUT vs. POST in RESTParsing values from a JSON file?JavaScript/jQuery to download file via POST with JSON dataHow do I upload a file with metadata using a REST web service?How to POST JSON data with Curl from Terminal/Commandline to Test Spring REST?Separate REST JSON API server and client?what's the correct way to send a file from REST web service to client?How do I write JSON data to a file?What is “406-Not Acceptable Response” in HTTP?REST API - file (ie images) processing - best practices

                      How can I change the color of pagination dots of UIPageControl?How to change UIPageControl dotsIs there a way to change page indicator dots colorCustomize dot with image of UIPageControl at index 0 of UIPageControlNo visible @interface for 'NSObject<PageControlDelegate>' declares the selector 'pageControlPageDidChange:'How to change the color of pagination dots in UIPageControl with a different color per pagepagecontrol indicator custom image instead of DefaultChanging the colour of UIPageControl dots in MonoTouchpagecontrol selectable page visibility color?Alternative way to load ViewControllers on a UIPageControlHow to set only layer.border-color for UIpage control dots in swiftHow can I develop for iPhone using a Windows development machine?How to change the name of an iOS app?UITableView - change section header coloruipagecontrol indicator(dot)issueCustom UIPageControl dots color not changingchange the interspace between UIPageControl dotsHow to change Status Bar text color in iOSHow can I change image tintColor in iOS and WatchKitUIPageControl dots with larger space in between each dotsHow to change the color of pagination dots in UIPageControl with a different color per page