Eclipse local changes for project - java

I can view local history of a single file with History View. But I need to see local changes for projects. I found that for remote changes. I need the same thing but for local changes.

if you are connected to a repository then it must be simple, please follow the following steps.
Right click on the project-->select team-->select show history.
This should do it.
If you don't have one then(pretty sure its not possible for entire project) you must consider getting one, i personally think github is useful

Related

Can I overwrite a Git repo with a completely new project?

I got a new computer yesterday. I am coding in Android Studio for a course that I'm taking, and I figured it would be as easy as re-downloading Android Studio and cloning my repo onto the new computer. It isn't.
Something is messed up about my Gradle version, and I don't have the time to figure it out before the next due date.
The solution I've potentially come up with is, because my program is relatively small at the moment (only a couple files beyond the boiler-plate files that come with any Android activity), to just copy and paste the Java code from each of my files into a newly generated empty activity with all the right Gradle versions, and then just push that to the repository.
My question is: is that possible to do? If so, is it as easy as just pushing the new project (without having ever cloned the repository), or is it more complicated? If possible, elaboration on an answer would be greatly appreciated.
Thank you!
It's very straightforward to do it:
Clone the desired original project
Add your desired code on top of the clone
Add & commit your changed
Now you can push your changes in several ways:
You can have a new commit
git push origin <branch name>
You can overwrite the current commit on your remote
git push -f the -f will force to "overwrite" the existing code
Yes, you can.
You just have to link your new local project to the git repository,
once you push the new changes they will erase the old ones.

How to resolve conflict in GitLab using GitShell or GitHub Desktop

I am pretty new to GitLab because we just moved to it from ClearCase. I Cannot merge some changes into my remote then to my local repo because the GitHub Desktop says that there are some conflicts. I have been looking around to find a simple solution for this in order to view the conflicting file. I got quite a few changes in my local too so I don't want to play around too much with the unfamiliar Git commands because I don't want to loose any of my changes. Is there simple way to find out which file is causing the conflict. I used git status and it says that my local branch is up to date.
I am a little lost. Can someone give me some hints.
Thanks
If i understood correctly then
Is there simple way to find out which file is causing the conflict?
Then try this command git ls-files -u will give a list of conflicts from Git.
Also you want to save your local changes then use git stash if you don’t want to do a commit of half-done work and you can get back to this point later by using git stash apply

New remote repository eclipse git

I have a java project that used to deal with a remote repository that now doesn't exist any more. It has a history I'd like to keep and I need to create another remote bare repository where push to and pull from, for the future commits. How can I do this, just starting from the only copy I have now, the local one (which is already some commits ahead)?
Eclipse has a Git Perspective that helps you achieve this.
Head over to Window -> Open Perspective -> Other and choose Git from the dialog
You would be presented with the Git Repository view.
Expand the Remotes section, and Click on Create Remote... Fill in the details of your new repository.
You can then choose to remove the previous remote and rename the newly created one as origin.

Android Studio: How to choose what to import from VCS

I'm using Android Studio 2.1, which is based on IntelliJ IDEA 2016.
If you select VCS -> Commit changes there's a nice dialog showing all the modified files and you are able to choose what to commit.
However when selecting VCS -> Update project there's no dialog. You have to update everything give or take.
I really miss eclipse's Team Syncronize perspective. It kicked ass compared to this, both for commiting and updating.
Is there a way of displaying a dialog to select which files to update? Or maybe some plugin? I'm getting tired of importing workspace metadata from other team members, or even broken builds when doing bulk updates. The only workaround seems to be looking at the incoming tab first, and then right click over the files you want, which is not very efficient as you have to expand their packages or parent folder first, and you might also need to manually refresh the incoming tab.
Yes that's a nice question but unforunately we have no ways First thing first to checkout documentation of IntelliJ IDEA 2016.1 Help given here but not in depth. As vcs-> update will update all files from remote branch and it will never provide you options because it is not implemented yet !!
Also see comments discussion on this answer they have talked about whole issue you have here the question asked little matching with yours is this which is the same having this discussion.
This is unlikely to be an issue with the Android tooling and more likely an issue with the underlying intellij idea software.
This is already discuss over here in google code issues :
https://code.google.com/p/android/issues/detail?id=184086
I have already tried to search plugin or help software but coudn't find one. :(
You just can add a .gitignore file for metadata.
Although, when you update your project it's a good practise to commit files before (and choose only those files you want to update).
Regards!

Team Synchronizing view in eclipse pulling a new class from remote repository

I have a new class being pulled from my remote git repository (this class does not exist locally at the moment), as shown in the image above.
In the team synchronizing view in eclipse when I right click on the class I am given the following options (see image below) and I'm not sure what to do.
I know with svn you have an update option, but this isn't available here, is merge the correct option?
Yes 'Merge' should be able to pull the class from remote.

Categories