How can I push to bitbucket.org without my project parent directory - bitbucket

I had created a remote repo with bitbucket.org, for example, https://somebody#bitbucket.org/somebody/test.git
When I pushed my local repo to the bitbucket repo by Eclipse EGit, I got all my project files in a parent directory, for example, https://somebody#bitbucket.org/somebody/test.git/Test/XXX. But I only hoped all my project files located in the repo root, for example, https://somebody#bitbucket.org/somebody/test.git/XXXX.
How can I do? Thanks!

eGit converts eclipse project into a folder under your Git repo when you 'share' it. This is the way eGit works, so I don't think what you asking is possible with eGit.
It is better this way IMO because such design allows for several projects in the same Git repository, which is very common.

Related

Why git pull rebase does not update my local folder?

Why git pull rebase does not update my local folder?
I have below groups in one of my Git version controlled iOS projects,
-- App
-- Libs
I see, for my project in Xcode, group name and physical folder name for Libs folder is same (i.e. CamelCased) but for all other team mates, the group shows CamelCased where their physical folder name is showing divergent (smallcase, libs). I have done git pull --rebase and got the latest of remote repository. But still the folder name does not get updated.
Inside Libs folder we have some library and surprisingly app is building fine for all members including me.
Why Git cannot detect the divergence between local physical folder and remote origin folder name? What should I need to do to make my local code exactly same as origin? Note that, when I clone the project in a new location, I see the folder name is small cased libs.
git prune did not help as well.
It seems git don't change case only changes.
If you want libs you can rename your local folder safely
if you want your team has Libs make a commit with the folder renamed _Libs and another one next after, with the folder renamed Libs.

What is the correct way to change the config of a new Gerrit project?

I have multiple projects that I need to create under Gerrit (I am owner/root).
My gerrit location is /home/gerrit/
The first project was created under /home/gerrit/review_site/.
(pointing to git repo in /var/www/gitrepos)
When I create a second project from the Gerrit Web interface (Create Project link), I inherit the All-Projects project --
I think from (review_site/etc/gerrit.config).
It gives me a choice to inherit from another project, but there is no relevant parent project, as this second project has different options mostly (different groups, etc.).
I don't see any way to configure options during the Create Project step.
Once the project is created, I see that it shares the /home/gerrit/review_site/ folder (and so shares logs, etc.)
What is the best way to change the new project's config? I can clone the git repo, upload the changes through Gerrit. But can I change the directory and other details from under it?
Which config file should it use and how do I specify it? Do I need to restart the Gerrit server as the config file will then be changed? At the moment, I'm not sure what the architecture should be:
- should each project be in a different directory? (/home/gerrit/project1, /home/gerrit/project2, ...?)
Any help wrt how to manage separate projects in Gerrit would be appreciated.
You can't associate different "gerrit.config" configurations for different projects (repositories). The GERRIT-SITE/etc/gerrit.config file is a unique configuration file for the Gerrit server not for a specific project. These are the project options you can set.
The local filesystem directory where the Git repositories are created is configurated using the gerrit.basePath option in the GERRIT-SITE/etc/gerrit.config file. See more info here.

Jenkins slave job with two git repos

I'm trying to setup master/slave on two osx machines, while using only slave for build.
Have one main git repo for the project but few additional files are kept in separate git repository. After adding two git repositories noticed after checkout it's creating two project directories under workspace and one has "#2" in the name.
That makes a problem with copying/accessing files between two repositories using $WORKSPACE variable as directory "project_name#2" is not logically part or $WORKSPACE (getting file not found error). And also cannot know which repo will be in which directory with every new build.
And more confusing sometimes it even pulls one repo to the master machine even though I've set that the build executes only on slave.
I'd appreciate any advice or suggestion?
If you're using the GIT plugin you can use advance cloning settings and specify a sub folder to clone to. make sure to clone to different folders under your workspace and then you can access both. I'm doing that in some of my projects and it works like a charm.
Use : https://wiki.jenkins-ci.org/display/JENKINS/Multiple+SCMs+Plugin
Good luck!

Question marks in project navigator Xcode 5

i just updated to Xcode 5 and my project is using GIT, after update completed suddenly question marks appear in project navigator file near each file.
when i am trying to Commit i don't see what files have been changed, i cannot pull also
and when i am trying to push it gives :Push Success" message but the repository on GitHub don't updated.
You probably did not set up your git repository properly. There are ways of adding external git repositories, but they tend not to work well for github (in my experience) and always lead to these sorts of issues.
If you want to set up a remote git repository through github on XCode these are the steps you should take.
Make the repository on github. Make sure to add the .gitignore file for Objective-C.
Clone the repository.
Go to XCode, press "create new project"
Create the project in the folder you cloned the repo to. I always name it the exact same thing, but I don't know if that is necessary.
Make sure not to select create local git repository.
This will definitely create a project that is under version control by a remote git repository hosted on github.
Quick fix is to Create or Save the new project 'outside' the directory (say Desktop) that is not linked to your github/bitbucket

Git not recognizing rails plugin

I installed the table_builder plugin from https://github.com/p8/table_builder, followed the directions at the bottom titled For a pre rails 3.0 table_builder: which works great.
The problem is since I checked out a branch of it, when I try to commit this to MY GIT repo, it doesnt think there are files even there.. git status diplays nothing, git add wont add the files..
Any suggestions as to how I can get this committed?
Maybe you cloned the plugin directly into your own repository and you now have the plugin repository within your repository?
A git repository will by default ignore any other repositories and their working directories that are located within it.
If so, you have (at least) two options:
Clone the plugin elsewhere, and then
copy the necessary files into your
repository
Clone the plugin into your repository
and then delete the plugin's .git
folder
There are other ways to manage this with git-submodule but I'm not an expert on that so I defer to someone with more knowledge.
Check the .gitignore file in your project root folder. If git status doesn't see the files and git add won't add them, it's most likely because they're being specifically ignored.

Resources