The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,869 other followers

Archive for the ‘git’ Category

github – What is the current way to remove a git submodule? – Stack Overflow

Posted by jpluimers on 2020/03/12

There is git submodule add, but no git submodule remove. That one is called git submodule deinit, but still a lot of links on the internet do not mention it, so I’m glad there is a good answer to [WayBackgithub – What is the current way to remove a git submodule? – Stack Overflow:

You have the git submodule deinit

git submodule deinit <asubmodule>    
git rm <asubmodule>
# Note: asubmodule (no trailing slash)
# or, if you want to leave it in your working tree
git rm --cached <asubmodule>
rm -rf .git/modules/<asubmodule>

deinit

Un-register the given submodules, i.e. remove the whole submodule.$name
section from .git/config together with their work tree.

Further calls to git submodule updategit submodule foreach and git submodule sync will skip any unregistered submodules until they are initialized again, so use this command if you don’t want to have a local checkout of the submodule in your work tree anymore.

If you really want to remove a submodule from the repository and commit that use git rminstead.

If --force is specified, the submodule’s work tree will be removed even if it contains local modifications.

–jeroen

Posted in Development, DVCS - Distributed Version Control, git, Source Code Management | Leave a Comment »

Sunsetting Mercurial support in Bitbucket – Bitbucket

Posted by jpluimers on 2020/01/30

February 1st, the start commences of Sunsetting Mercurial support in Bitbucket – Bitbucket [WayBack]. Starting June 1st, only git is supported by Bitbucket, despite them having started with and focused mainly Mercurial at first.

Here are the major dates of the sunset:

  • February 1, 2020: users will no longer be able to create new Mercurial repositories
  • June 1, 2020: users will not be able to use Mercurial features in Bitbucket or via its API and all Mercurial repositories will be removed.

All current Mercurial functionality in Bitbucket will be available through May 31, 2020.

So by now you should have started migrating from Mercurial to git, probably away from BitBucket.

Reading their community, it looks like an in-place conversion (keeping all issues, comments, wikis, pull-requests, etc) and just replacing the mercurial repository with the converted git repository is impossible.

Given that the user experience on Bitbucket for git repositories is far behind sites like GitHub or GitLab, migrating away after conversion sounds like a very good move.

Conversion used to be hard Moving my BitBucket mercurial repository to git was a lot harder than I hoped for (but moving to GitHub was easy) « The Wiert Corner – irregular stream of stuff

So by now, I am anxious to see if the steps linked from the quote are easier:

We recommend that teams migrate their existing Mercurial repos to Git. There are various Git conversion tools in the market, including [WayBack] hg-fast-export and [WayBack] hg-git mercurial plugin. We are happy to support your migration, and you can find a discussion about available options in [WayBack] our dedicated Community thread.

–jeroen

Posted in BitBucket, Development, DVCS - Distributed Version Control, git, Mercurial/Hg, Software Development, Source Code Management | Leave a Comment »

Some things I learned from “Git tips and tricks | GitLab”

Posted by jpluimers on 2020/01/21

Via [WayBackGit tips and tricks | GitLab “Handy Git commands for everyday use” I learned these:

 

–jeroen

Via: [WayBack] GitLab on Twitter: Ready to get #backtowork? Brush up on a few tips and tricks we use at GitLab everyday: https://t.co/W8zFjxnSN6

Read the rest of this entry »

Posted in Development, DVCS - Distributed Version Control, git, Software Development, Source Code Management | Leave a Comment »

Hopefully one day there will be `git submodule remove`

Posted by jpluimers on 2019/12/04

I like that you can add git repositories inside eachother using git submodule add but when it’s time to say goodbye to a submodule you need some convoluted statements. So I really wish one day there will be git submodule remove.

Until then, these links will help you to get rid of a git submodule:

TL;DR you have to manually edit the below files:

  • .gitmodules
  • .git/config

Then you need to:

  • (recursively) remove the subdirectory containing the submodule in the repository
  • sometimes (recursively) the subdirectory containing the submodule in .git/modules

–jeroen

Posted in Development, DVCS - Distributed Version Control, git, Source Code Management | Leave a Comment »

Git: Push a new or existing repo to Github · GitHub

Posted by jpluimers on 2019/11/27

Since I tend to forget the exact statements for starting a fresh repository and push it to a git hoster like GitHub or GitLab: [WayBack] Git: Push a new or existing repo to Github · GitHub

–jeroen

Posted in Development, DVCS - Distributed Version Control, git, GitHub, GitLab, Software Development, Source Code Management | Leave a Comment »

 
%d bloggers like this: