Showing posts with label Git. Show all posts
Showing posts with label Git. Show all posts

Friday, 1 August 2025

Move git submodul to it's own git repo

 Git 2.49.0.windows.1


After failing with filter-repo I got it done with the good old subtree, which I also used to do the opposite: Move a Git & Maven project as module to a parent project

I followed this Steps: Detach (move) subdirectory into separate Git repository


1. Create a new repo in BitBucket

2. Clone the new repo to local

3. Go to the bigRepo and do this:

git subtree split -P foldernameOfSubmodule -b newBranchName

The -b stuff is the branch, where the submodul is put, and which also has the history for this submodul

4.  Go to the cloned new repo and type:

 git pull path/to/oldrepo branchname

5. Go to old repo and remove the submodule

6. Remove the submodule from the submodule list in the pom

7. Add .gitignore and fix the pom in the new repo





Tuesday, 15 April 2025

Move a Git & Maven project as module to a parent project

Maven 3.9.9
Git 2.49.0.window.1

First go to the parent folder in Git Bash and add a git subtree:

git subtree add -P dir-name git-repo revision

dir-name:    name of the module
git-repo:      The git-url from the project you want to move. In Bitbucket you find this in repository settings. example: https://git.mycompany.com/git/scm/clients/mycompany-webservice-client.git
revision:      for me this was always HEAD

This adds the project to the parent project.

Next steps:
- in the module pom set the parent and delete the own version and maybe SCM tag
- in the parent add the module as module (and maybe as dependency with the project.version version, if you want to use the parent as bom (bill of materials))

Sources:
How to Move a Git Repository into a Sub-Folder of Another Repository



Wednesday, 21 March 2012

Apatana Studio: Terminal einrichten

Aptana Studio 3, build: 3.0.9.201202141038
Git 1.7.6
Windows 7

Der Terminal (Windows/Show View/Terminal) scheint unter Windows nicht von Beginn an zu funktionieren. Lösung war unter Windwos/Preferences/Team/Git den Pfad zu git.exe anzugeben, schon funktioniert der Terminal.



Links
Aptana Studio Support Beitrag

Tuesday, 20 March 2012

RubyOnRails: Projekt anlegen hinter Proxy

RailsInstaller 2.1.0

Will man ein Projekt  anlegen (rails new projectname) hinter einem passwortgeschützen Proxy ist beim "bundle install" Script oft Schluß, da man sich nicht mit rubygems.org verbinden kann.

Abhilfe schafft es, den Proxy in 2 Files einzutragen

  • RailsInstallerOrdner/RubyOrdner/setup_environment.bat
  • ~/.gitconfig

In setup_environment.bat trägt man ein:

set HTTP_PROXY=http://username:password@xxx.xxx.xxx.xxx:xxxx

In .gitconfig fügt man hinzu:

[http]
proxy = http://username:password@@xxx.xxx.xxx.xxx:xxxx

Damit sollte man nun das Projekt anlegen können.

Links:


Sunday, 18 March 2012

Aptana kann nicht auf github pushen

Aptana Studio 3, build: 3.0.9.201202141038
Git 1.7.6
Windows 7

Obwohl im Aptana Studio unter Windows/Preferences/General/Network Connections/SSH alles korrekt eingetragen ist, auf GitHub der Public Key hinterlegt wurde, läßt sich einfach nicht auf GitHub pushen, es gibt ständig diese Fehlermeldung:
Permission denied (publickey). fatal: The remote end hung up unexpectedly 
Die Lösung war, den Inhalt von ~/.ssh, wo der Public Key abliegt (dessen Pfad auch im Aptana Studio eingetragen war), in das .ssh Verzeichnis der git Installation zu kopieren. Schon funzt es.

Scheinbar ist es Aptana Studio ziemlich schnurz daß man das .ssh Verzeichnis richtig in den Einstellungen angibt, verwendet wird das .ssh Verzeichnis der Git Installation.

Links:
Aptana Studio Support Beitrag