When i clone my github repository my gradle folder automatically fills with 3000 + files. I have a .gitignore file ignoring the .gradle folder. This results in 3000+ files needing a commit on git. No other users of the repo gets these, and their gradle folder only has few files shown in picture 1 (my gradle folder is shown in picture 2).
Its frustrating, since it leads to errors in github, when i have to commit this many files.
Mostly likely - the gradle home is probably set as ./gradle in your Intellij or your login profile.
it should ideally be /Users/<>/.gradle
Related
I am very new to Tortoise SVN so I hope I use the correct terminology...
I have a repository, say C:/RCode and I was checking it out into say C:/Working. I do not know what exactly went wrong, but I must have checked out something in my repository C:/RCode. As a result, this folder has now features of both a repository and a checked out folder - e.g. it now also has the green v icon overlay next to the icon overlay of a repository.
How can I tell Tortoise that this is should not be a checkout folder?
To make Tortoise SVN forget a folder is a checked out folder, it suffices to show hidden files and folders in the folder of interest and then delete the hidden folder .svn
The command you're looking for is an svn export. An svn checkout is the process of tracking local changes into a series of deltas (inside that .svn folder) so that you may commit changes back to the repository.
An export does essentially what a checkout does, but without the version control aspect of it. The command you would run for your example would be:
svn export file:///C:/RCode C:/Working
Or if you're using TortoiseSVN:
Right click anywhere in Windows Explorer
Enter the URL of the repository and output directory
Specify a revision (HEAD by default)
Select OK.
Simply deleting the .svn folder works as well, but it's an extra step (along with cleaning your Recycle Bin). It's also worth noting that svn export is useful for making a copy of your local working copy (a checkout) to a non-versioned copy somewhere else on your local machine.
svn export C:/Working C:/NonCheckout
I reinstalled my OS (KDE neon) and I thought why not backup my project git folder, before I reinstalled I made sure I commited any code and everything in my git project folder was up-to-date.
So after reinstalling, I moved my project back onto my PC from my backup drive and ran git-status and it wants to stage nearly all of my project?
What do I do? I don't want to commit all these files again when I have not editing any of them? Its nearly 800 files it wants to stage?
You could reset your project using:
git reset --hard branch_name
This would lose any unstaged files.
Or you could stash the changes:
git stash save 'msg'
This works like the previous one, but instead it saves the unstaged files in a separate "memory" (in case you need them later on).
Now, I may assume that the reason you got that situation in the first place is maybe when you restored your data back from the drive, the OS changed some properties on those files, stuff like creation/modification dates, permissions...etc. While the content of the files has not changed but the properties are. Still, git sees them as modified files.
Currently i am using Android Studio version 2.2.
Once we add configuration file into .gitignore file of project root directory and then make any changes to ignore files, Still it shows these changed file while committing.
So how can we avoid these files from showing up while committing.
I have tried removing ignore files file from Setting->Version Control->Ignore Files , And restarted the Studio.But is doesn't work.
I have tried to removing previously cached file from git rm -r --cached .
And then re-added the gitignore files and added the project again.
But still all the git ignore file shows while committing and leads to problem by mistakenly selecting them.
Anyone who have faced this please guide to remove these git ignore file while committing in Android Studio.
Have tired this but didn't get any help.
You need to remove (or "ignore") these files from version control.
One option is:
Close Android Studio;
Remove the files that you need to remove from vcs (probably something like rm -rf .idea/);
Commit your changes;
Make sure that all files that you want are on your .gitignore;
Reopen Android Studio;
Now he will create all files that he needs to execute, such as .idea folder, but you don't need to worry because now they are out of version control.
I have a linux eclipse project checked into our company svn. Works great.
The project is intended to be cross compiled on Windows.
Untill now, I have simply moved the source files between OSes. However, I thought I'd like to let svn do this for me. Should be simple enough, just checkout the eclipse linux src into the VS project dir, right? Wrong!
The correct source was checked out of svn and it worked fine. But when I tried to check it back in i kept getting "Commit not completed filename remains in conflict" errors. I hadn't even changed anything!
Did a little checking. Turns out the linux src directory is pretty much just the source and headers. On the MSVS side the project directory contains the source and headers but also contains a bunch of files that are used by VS with names like projname.vcproj etc. etc.
So, I did a checkout into a scratch dirextory, .\fred. Checked .\fred back in. No problems. Added a new file to .fred, xxx.xxx. Check in reported:
svn: E200009: Commit failed (details follow):
svn: E200009: 'C:\Projects\fred\xxx.xxx' is not under version control
Makes me wonder about those uncommitted Visual Studio files.
So, are those files my problem? Are they breaking the commit operation?
As an alternate solution I am thinking of adding the VS files to the src dir in svn. If linux/eclipse checks them out I can tell eclipse to ignore them (I think it'll just ignore them for me). Any thoughts or recommendations for this approach?
(BTW, i still had fresh source on the linux side so any thing that got clobbered could be safely restored.)
So here is one solution I have working for the moment. I am not sure how totally stable it is.
Caveat: The project i am using already existed as a MSVS project.
In the MSVS solution dir, rename the source dir (MSVS likes the source dir name to match the solution dir name, so this means the source dir may not be named src) to something uninvolved in the solution, like temp.
SVN checkout the src (eclipse like to call source dirs src).
cd into the source dir. Issue the command:
svn changelist msvs *.cpp *.h
Add *.c if needed. "msvs" is the changelist name. It can be whatever you want ti to be.
This will created a changelist for the checked out directory.
Now, copy the remaining files from the temp directory into your source dir.
When you need to do a checkin, cd into the source dir and issue this command:
svn ci --changelist msvs
Note. You have to be in the src dir for this to work.
Windows XP SP3; TortoiseSVN 1.6.16, Build 21511 - 32 Bit, which is the current version at the moment.
We're using Eclipse Helios for some Android development. When one of the projects was first checked in using TortoiseSVN, the bin and gen folders were included. I'm trying to delete them from SVN.
I went to the Repo Browser and deleted the bin and gen folders from the project. The Repo Browser log shows two "Deleted" entries for revision 40583. I then went to my working copy and did an SVN Update. It deleted the folders, as expected. The File Explorer shows a green icon for the project.
Next, I ran Eclipse and did Project/Clean. The bin and gen folders were created. The gen folder shows the purple question mark icon as an unversioned folder, as expected. The bin folder, however shows a red exclamation point icon, and it and all of its child folders all contain a .svn version control subfolder. If I exit Eclipse and do a TortoiseSVN Cleanup, the bin folder temporarily shows a green icon and then immediately switches back to the red exclamation point icon.
What's going on?
You should install a SVN client in eclipse, and don't use TortoiseSVN altogether on the same directory as eclipse is working on. This is the root cause of your problem, and it will come again and again.
So the proper use is:
Install a SVN client like subversive or subclipse inside eclipse.
Depending on the client you choose, checkout the project from your subversion repository using the menu entries of the client you have installed.
After having checked-out the project, check the properties of the root folder of the project. They should define that the bin folder (or target if you are using Maven) should be ignored.
If you have to add that property, ensure to commit it, so others will not have the same problem.