I already took a look at the JDT Icons but did not find this icon:
Does it say something about git-related information, since that is a project connected to a git repo. The status of the local repository is updated, since I recently used git pull on the project.
Does it show some other git-related status?
Thanks in advance.
This means the resource (Project, Folder, File) is checked in to some source control system such as Git, SVN, CVS, using the 'Team' menus.
When using Git the icon means that the folder contains one or more files that have been committed once before (and does not only contain files that have all been excluded via .gitignore. In short, the folder contains at least one tracked file.
Please note, Git does not track folders (e. g. in contrast to SVN which uses the same icons with a slightly different meaning), but only files, so the icon refers to the files the folder contains and not to the folder itself.
See also:
Window > Preferences: Team > Git > Label Decorations
EGit User Guide - Icon Decorations
Related
I've seen similar questions but some are very old and some are not quite what I'm looking for or have no answers.
I have projects in Eclipse under /workspace/project1 and /workspace/project2. They are Gradle projects and are dependent on each other. I also have /workspace/project3 which is a Gradle project but independent.
I need to "upload" them to a git repo on Bitbucket. I installed EGit to help me with this. It asks me where my local repo is located and I don't know what to tell it. Should I create a repo per workspace or per group of dependent projects or what?
For example when I right click a project and press Team > Share > Git I get to this dialog and I don't know what I should fill in there.
Each (non-bare) git repository has a work directory in which the files of the currently checked out commit (referred to as HEAD) are stored.
By default, the work directory is the parent of the git metadata directory (named .git), but it can be detached through a config setting. For example: git config core.worktree /path/to/workdir
EGit cannot deal with repositories that have a detached work directory as answered here: EGit working directory not under the local repository
But irrespective of this limitation, you cannot split the work directory of a git repository among several workspaces.
Therefore, you should move the projects to the work directory to resemble this structure:
~/git/my-repo/.git
~/git/my-repo/project1
~/git/my-repo/project2
~/git/my-repo/project3
If project3 is independent of the others, it may remain where it is or be located somewhere else entirely.
A word of caution when planning to have interdependent projects spread across several git repositories. This makes the git repositories effectively interdependent as well, but without git having a dependency management tool.
To have EGit move the projects, you would enter project1 in the Path within repository input field.
Commonly used build files like the master pom.xml or corresponding Gradle files would be located in the root of the work directory. This also eases configuration of popular build services like Travis, Codeship and friends.
A few things to understand/keep in mind:
An Eclipse workspace is a logical container of projects, not necessarily a physical container. The folder in which a worksapce is located can also be a physical container of projects, meaning the project's files can be located in a folder under the workspace folder (this is the default location if you create a new project in Eclipse). But that is not a requirement; a project that is contained within a workspace can have its contents (its files) located in any location on your file system.
In most dev setups, the local git repos are located in a "standard" location in the user's home directory, namely %USER_HOME%/git/name-of-repo. Again, that's not a hard requirement, users have the option to clone or create repos in any location they choose.
So Eclipse eGit is showing you those 2 axes of flexibility. It's asking where you want to create your local git repo, which usually is different than your workspace folder. Use the Create... button to create it. I think at that point it will auto-populate the Path within repository field. If it does not, you can name that path anything you want (usually its the same as the project name, though not necessarily)
At the end of it all you'll have your workspace (logical container) as well as a local git repo which will be the physical location of the project contents.
i created a C++ project called us_txn_svc in eclipse kepler.
The workspace location is in /data/work/usfsi/, the project location in /data/work/usfsi/fsi_svc_us/us_txn_svc.
In project explore view, the proejct us_txn_svc is shown with a "remote" decoration on the icon and a suffix like " [fsi_svc_us echo]", echo is my user name on this computer. all files under this project are also shown with a "remote" decoration.
how to configurate my workspace to hide these useless infomation?
a snapshot:
The icon overlay decoration tells you the file is under version control, the information in [] gives you more version control information such as the repository.
You can usually turn all the decorations off by going to Preferences > General > Appearance > Label Decorations and unselecting your version control system (Git, SVN, CVS etc.)
You can fine tune the information shown for by version control in "Preferences > Team" ("Preferences > Version Control (Team)" in newer versions of Eclipse), select your version control system and look for Label Decorations.
Hey this should give you a good idea of this and more Eclipse Egit icons:
dirty (folder) - At least one file below the folder is dirty; that
means that it has changes in the working tree that are neither in the
index nor in the repository. tracked - The resource is known to the
Git repository. untracked - The resource is not known to the Git
repository.
ignored - The resource is ignored by the Git team
provider. Here only the preference settings under Team -> Ignored
Resources and the "derived" flag are relevant. The .gitignore file is
not taken into account.
dirty - The resource has changes in the
working tree that are neither in the index nor in the repository.
staged - The resource has changes which are added to the index. Not
that adding to the index is possible at the moment only on the commit
dialog on the context menu of a resource.
partially-staged - The resource has changes which are added to the index and additionally
changes in the working tree that are neither in the index nor in the
repository.
added - The resource is not yet tracked by but added to
the Git repository.
removed - The resource is staged for removal from
the Git repository.
conflict - A merge conflict exists for the file.
assume-valid - The resource has the "assume unchanged" flag. This
means that Git stops checking the working tree files for possible
modifications, so you need to manually unset the bit to tell Git when
you change the working tree file. This setting can be switched on
with the menu action Team->Assume unchanged (or on the command line
with git update-index--assume-unchanged).
I am migrating from Eclipse/SVN to Eclipse/Git and I am unsure what the best directory layout would be. I have looked at the Vogel/a guide, the Eclipse Wiki as well as the following threads: Is it better to keep Git repository inside or outside of Eclipse workspace? Should I store git repository in Home or Eclipse Workspace?
I am used to setting up eclipse like so:
~/projectA/workspace/.metadata
~/projectA/workspace/subproj1/.project
~/projectA/workspace/subproj2/.project
~/projectA/subproj1/.svn
~/projectA/subproj1/file1
~/projectA/subproj2/.svn
~/projectA/subproj2/file2
So the project holds all project related files i need. The workspace folder holds relatively little data like the local revision info, project descriptions and specific eclipse settings.
The subproj folder(s) hold all the source code but also the subversion meta info.
The subprojects are more (or less..) related but they all contribute to projectA.
The eclipse working directory is ~/projectA/subproj1, ~/projectA/subproj2, etc.
I am not completely sure if i could use a more or less similar layout with Git. Biggest difference would be the 'repo' dir.
~/projectA/workspace/.metadata
~/projectA/workspace/subproj1/.project
~/projectA/workspace/subproj2/.project
~/projectA/subproj1/.git
~/projectA/subproj1/file1
~/projectA/subproj2/.git
~/projectA/subproj1/file2
~/projectA/repo/subproj1
~/projectA/repo/subproj2
If i set it up like the following, do I still comply with the best practices as mentioned in the Wiki?
#eugener I would assume the following layout complies with the Egit manual?:
~/projectA/workspace/.metadata
~/projectA/workspace/subproj1/.project
~/projectA/workspace/subproj2/.project
~/projectA/subproj1/.git
~/projectA/subproj1/file1
~/projectA/subproj2/.git
~/projectA/subproj1/file2
I would suggest to comply with EGit Wiki simply because the the way Git works.
The main point of Git is fast branching and merging, which is accomplished in repository's workspace, location of which is fixed in the folder where your repo is. Actual repository is located one level down in .git folder.
When project in Eclipse is "shared" with Git all the files are automatically moved from Eclipse workspace where the project was created to the location of the git repo it was shared with. So project in Eclipse is just a shortcut. Branch switching replaces the files in Git workspace which is automatically reflected in Eclipse.
I want to configure SVN on my computer.
For that how would I create a repository?
How to give all the paths needed?
I am using Mac os 10.7.3 Lion and Xcode 4.2.
To setup your Subversion repository in XCode 4, go to File → Source Control → Manage Repositories. Once there, you will see an option to add a repository:
After selecting Add Repository option, you will need to enter your Subversion repository URL and the name you wish to add to your repository:
Click next, and on next step you should see an option to setup paths to your folders in your svn repository. There are three folders which are usually created by default when you use svn, and they are called /trunk, /tags, /branches. In case you don't have this folders, you can skip this step, it's optional.
Now you should see in XCode organizer your repository in the sidebar. What we would like to do is add one of our projects to Subversion so we can use version control for the project. We would like to add the project to /trunk folder of our repository. In order to do this, click on the /trunk folder, and then click on the import button.
When you click import, select the folder of files which you would like to import. Then you will be prompted to enter a commit message. After this, click refresh, and you should see the new files added to your repository.
Now your project is under version control, and you should be able to see it in your Beanstalk account, in your repository. All you need to do now is checkout the files to a location of your preference, and open the project from this location.
When you open the project, you will see flags next to all files you modify, add or delete and you will see an option to commit the files.
May this Helping to you
Happy Coding.
i'm using netbeans with the built-in mercurial support and want to omit a sub-folder from versioning.
how do i do that?
thanks!
I am not sure if there is a way to do this directly from Netbeans, but you can add a .hgignore file in the root of your repository to specify what files or folders to ignore. The following links will provide all the information you might need:
http://www.selenic.com/mercurial/hgignore.5.html
How can I ignore everything under a folder in Mercurial
http://kiln.stackexchange.com/questions/707/how-to-exclude-bin-and-obj-folders
This thread is old, but just in case people find it while looking for the answer...
Check this out: http://netbeans.org/kb/docs/ide/mercurial.html
Once you've initialized the project, if you've done in a valid location (generally right in the root of the project), all the "new" files will have green filenames & the new folders will display a small blue db icon on them. This indicates that they are not in sync with the repository and need to be committed/synced. You can select click any number of files & folders (singly or ctrl click) and choose Mercurial -> Toggle Ignore and the files will be ignored from then on. They will also turn gray to indicate that they aren't really being paid attention to.
You'll also want the Window->Versioning->Mercurial window open when working with Mercurial. This automatically refreshes a list of "locally" changed files that need to be synced with the repository. If an item is listed there & you mark it to be ignored, it (& any children in case of a folder), will be removed from the list to be synced.
When you're done with a revision, you can click the "Commit All" button in the Mercurial Window/Panel to sync the new file version(s) with the repository.
See the link above for more details on how to use the features.
Note also that NetBeans supports Git, SubVersion, & Mercurial, but to use any of them you have to first install them on your machine / have a system for NetBeans to connect to.
This is how it is as of v7.0.1+ (I didn't use it before then so I don't know if there are any differences before v7.0.1)
㋛ ㋡ ㋛ ㋡ ㋛ ㋡
Todd β)