question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Checkout after adding a project

See original GitHub issue

To me the workflow after adding a project that has already a history is not clear.

Here’s what I did:

$ meta project add js-multihash git@github.com:multiformats/js-multihash.git
meta project adding 'git@github.com:multiformats/js-multihash.git' at js-multihash
created /home/vmx/src/pl/meta/ipld/js-multihash
Initialized empty Git repository in /home/vmx/src/pl/meta/ipld/js-multihash/.git/
set remote origin to git@github.com:multiformats/js-multihash.git
adding "js-multihash": "git@github.com:multiformats/js-multihash.git" to .meta file at /home/vmx/src/pl/meta/ipld/.meta
adding js-multihash to .gitignore at /home/vmx/src/pl/meta/ipld/.gitignore

js-multihash isn’t checked out yet:

$ ls -a js-multihash
.  ..  .git

So I though I do a meta git update:

$ meta git update
all repositories in .meta are cloned locally

That doesn’t do anything. Next try is a pull (that would also screw with your existing repos):

$ meta git pull 
…
here is no tracking information for the current branch.
Please specify which branch you want to merge with.
See git-pull(1) for details.

    git pull <remote> <branch>

If you wish to set tracking information for this branch you can do so with:

    git branch --set-upstream-to=origin/<branch> master

A checkout would make more sense:

$ meta git checkout
js-multihash:
fatal: You are on a branch yet to be born
js-multihash: command 'git checkout ' exited with error: Error: Command failed: git checkout

There’s still no proper checkout.

Next is then just removing the directory and using update:

$ rm -Rf ./js-multihash
$ meta git update

*** the following repositories have been added to .meta but are not currently cloned locally:
*** { 'js-multihash': 'git@github.com:multiformats/js-multihash.git' }
*** type 'meta git update' to correct.


 cloning missing repositories


js-multihash:
Cloning into 'js-multihash'...
remote: Enumerating objects: 7196, done.
remote: Total 7196 (delta 0), reused 0 (delta 0), pack-reused 7196
Receiving objects: 100% (7196/7196), 6.11 MiB | 5.40 MiB/s, done.
Resolving deltas: 100% (1373/1373), done.
js-multihash

That does the actual checkout as I would expect it.

So it is expected that meta project add is about new projects and not existing ones.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:17 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
mateodelnortecommented, Apr 15, 2019

I’m not against renaming the current add command to meta project init and creating a new meta project add which expects a remote to exist.

1reaction
nwillccommented, Jun 5, 2019

It confused me that the meta git pull failed after the project add, but worked if I did a fresh meta clone of same repo elsewhere…

Read more comments on GitHub >

github_iconTop Results From Across the Web

Git Checkout | Atlassian Git Tutorial
Git branching intro. Create, list, rename, delete branches with git branch. git checkout: select which line of development you want and navigate branches....
Read more >
Initial Check-Out of Project from Repository - CloverDX
The following steps describe checking out of an existing project with help of TortoiseSVN. Check-out the content of projects from SVN: Right click...
Read more >
Checkout A Project With Git And Visual Studio - Stack Overflow
After that you will be able to add your project and check it in by adding it to the local folder. Share.
Read more >
Redirect to checkout after pressing the "Add to Cart" button
First, it checks whether Drupal has sent a message that you added a product to your cart, and then performs a simple redirect...
Read more >
Stripe Checkout | Stripe Documentation
Learn how to add a checkout page to your website and collect payments. ... Learn how to fulfill orders after a customer completes...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found