How to recover eclipse git history when it is overwritten

Updated on history 2024-02-08
11 answers
  1. Anonymous users2024-02-05

    Click the commit button to commit ** to the local repository. Of course, you can also click the commit and push button to submit ** to the local repository and upload it to github.

    If you click the commit button, the next step is to push ** to GitHub. Right-click on the project and select team ->remote ->push

    Enter the URI of the repository you created on GitHub earlier

    The host and repository path are automatically generated and do not require input. user and password need to be entered.

    Next, select the branch, in this case, master instead of head.

    Then click Add Spec

    Click Done, and the upload is successful. At this point, check on github to see if the ** has been uploaded.

    If the upload is not successful, it may be that force update was not selected in the previous step. It is recommended that you check this box for each upload.

    That's it.

  2. Anonymous users2024-02-04

    The installation process selects the compilation environment C and C++ that need to be installed according to your actual needs, and you can also choose Mingw System Tools if needed. Once the installation is complete, you will also need to configure environment variables to allow Eclipse to find Mingw. Add mingw to the environment variable path of the system, e.g. mingw's installation directory is d:

    mingw, then add d: mingw bin to the system's environment variable path.

  3. Anonymous users2024-02-03

    You can use client git, such as tortoisegit, to get it locally and process it in Eclipse.

  4. Anonymous users2024-02-02

    Did you overwrite the files in the installation package with other files?

  5. Anonymous users2024-02-01

    I only know how to use commands, and I don't think it's troublesome to use commands.

    git checkout --no hassle...

  6. Anonymous users2024-01-31

    Use replace with in the context menu to undo (note that it's not in Tream).

    With egit, you can undo file changes and take different actions depending on the status of the file.

    1.For file modifications that have not been modified by git add, team->replace with->file in git index is sufficient.

    2.For file modifications that have not been git committed, you can choose from the following:

    Just team->replace with->head. Of course, you can also git reset --hard to undo all changes to the current branch.

    Just replace team->replace with->branch, tag or reference

    Just team->replace with->commit

    3.For changes that have already been git committed (not necessarily files), just team->replace with->previous revision

    Of course, you can also right-click Revert Commit in the History View to undo all the changes made to a specific commit.

    Web Links.

  7. Anonymous users2024-01-30

    Because you have joined the project, you are not allowed to join the same project again, I tried to change the file name, but it was useless. In the import projects interface, the checkbox in front of the copy projects into workspace is empty, remove it and browse again, and click refresh to refresh if you browse first. The gray ones will be displayed.

  8. Anonymous users2024-01-29

    The project will not be lost, it will still be in a local directory, since your project is imported by git, why not use git to import it again.

  9. Anonymous users2024-01-28

    It should be impossible to undo the commit, and it can only be overwritten with the previous version.

  10. Anonymous users2024-01-27

    Method steps.

    Right-click "team" on the project, select "commit", and do the same thing as a normal submission.

    Submit and push.

    The push failed and was rejected.

    The project needs to be updated to do the merger.

    After the update, a pop-up window is displayed, and the conflicting file fails to be updated, and the file in the project is reported red.

    Conflicting files, right-click"team", select "Merge Tool", and you can view the comparison of the changes in the open view.

    Modify each conflicting file to the correct one, then right-click each file"team", select "Add to index", and you can see that the file turns into a black * icon.

    So after the conflict handling is completed, you can commit it as a normal commit for a git project.

  11. Anonymous users2024-01-26

    Hello, I noticed your problem a few days ago, and I want to see if any of the experts have given some advice, but no. I also use git, and I have some suggestions for resolving conflicts.

    The first thing you need to understand is the cause of the conflict, two branches are changing the same file at the same time.

    Since the same file is modified at the same time, there are two scenarios.

    Take the ** of one of the branches.

    Merge two branches, both branches.

    As for conflict resolution, because we use Eclipse, there is a merge tool integrated into the git conflict resolution software, if you don't have to, you don't have to be afraid, you can see that the conflict file has a flag in it:

    head to ===branch1 is your current branch, and === to commitinum is on another branch, if you only need branch1's, you just delete === to the content between commitnum, and then remove "The best way to resolve conflicts is to avoid, and then to solve, if you don't understand something, please leave a message:

Related questions