Git Product home page Git Product logo

meta-git's Introduction

Build Status

meta-git

Manage your meta repo and child git repositories.

git plugin for meta

Usage

➜  meta git

  Usage: meta-git [options] [command]


  Commands:

    branch      List, create, or delete branches
    checkout    Switch branches or restore working tree files
    clean       Remove untracked files from the working tree
    clone       Clone meta and child repositories into new directories
    pull        Fetch from and integrate with another repository or a local branch
    push        Update remote refs along with associated objects
    remote      Manage set of tracked repositories
    status      Show the working tree status
    tag         Create, list, delete or verify a tag object signed with GPG
    update      Clone any repos that exist in your .meta file but aren't cloned locally
    help [cmd]  display help for [cmd]

  Options:

    -h, --help  output usage information

meta git clone

Clones a meta repository and it's child repositories.

meta git clone <repo>

meta git update

Clones any child repositories from the .meta file that are missing.

meta git clone <repo>

meta git status

Track your progress on all branches at once:

meta git status

asciicast

meta git branch

View what branches exist on all your repos:

meta git branch

asciicast

meta git checkout

Create new branches on all your repos at once:

meta git checkout -b [branch-name]

Check out an existing branch in all projects:

meta git checkout main

Revert all modified files to their remote status:

meta git checkout .

asciicast

meta git clean

Remove unwanted untracked files on all repos:

meta git clean -fd

asciicast

meta-git's People

Contributors

aleclarson avatar mateodelnorte avatar patrickleet avatar renovate-bot avatar renovate[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

meta-git's Issues

Action required: Greenkeeper could not be activated 🚨

🚨 You need to enable Continuous Integration on Greenkeeper branches of this repository. 🚨

To enable Greenkeeper, you need to make sure that a commit status is reported on all branches. This is required by Greenkeeper because it uses your CI build statuses to figure out when to notify you about breaking changes.

Since we didn’t receive a CI status on the greenkeeper/initial branch, it’s possible that you don’t have CI set up yet. We recommend using Travis CI, but Greenkeeper will work with every other CI service as well.

If you have already set up a CI for this repository, you might need to check how it’s configured. Make sure it is set to run on all new branches. If you don’t want it to run on absolutely every branch, you can whitelist branches starting with greenkeeper/.

Once you have installed and configured CI on this repository correctly, you’ll need to re-trigger Greenkeeper’s initial pull request. To do this, please click the 'fix repo' button on account.greenkeeper.io.

Add Support for sparse checkout

πŸš€ Feature Proposal

Feature to sparse clone a repo in .meta projects configuration.

Motivation

Some of repos that need to be cloned into meta repo can be mono repos. In the meta repo it would be nice to be able to do a sparse checkout of such a mono repo into the meta repo.

Example

{
"projects": {
"project1": "https://github.com/myorg/repo1.git/project1",
....

meta git tag

automatically git tag and git origin push [tag] with current version number of meta and child repos

meta fails to create annotated tag with -m option using double quotes

on Unbuntu 17.10. Doesn't seem to like the double quotes (but this works fine for meta git commit -m "commit msg"

Failing:

kbroch@barolo:/home/kbroch/metatest  git:(master) $ node --version
v8.9.4
kbroch@barolo:/home/kbroch/metatest  git:(master) $ meta --version
1.0.48
kbroch@barolo:/home/kbroch/metatest  git:(master) $ meta git tag -a RC -m "release candidate"

metatest:
fatal: Failed to resolve 'candidate' as a valid ref.
metatest exited with error: Error: Command failed: git tag -a RC -m release candidate

test:
fatal: Failed to resolve 'candidate' as a valid ref.
test exited with error: Error: Command failed: git tag -a RC -m release candidate

testlabelcopy:
fatal: Failed to resolve 'candidate' as a valid ref.
testlabelcopy exited with error: Error: Command failed: git tag -a RC -m release candidate

Passing:

kbroch@barolo:/home/kbroch/metatest  git:(master) $ meta git tag -a RC -m release-candidate  

metatest:
metatest βœ“

test:
test βœ“

testlabelcopy:
testlabelcopy βœ“

feat req - add path to meta git status

Would it be possible to add the corresponding path to the output of meta git status for each of the projects in meta. It would make navigating to them much easier to do commits etc.

Current output:

meta-test:
On branch master
Your branch is up-to-date with 'origin/master'.

nothing to commit, working tree clean
meta-test βœ“

project-test:
On branch master
Your branch is up-to-date with 'origin/master'.

Changes not staged for commit:
(use "git add ..." to update what will be committed)
(use "git checkout -- ..." to discard changes in working directory)
modified: go.mod
modified: go.sum
modified: main.go

no changes added to commit (use "git add" and/or "git commit -a")
project-test βœ“

New Output:

meta-test:
On branch master
Your branch is up-to-date with 'origin/master'.

nothing to commit, working tree clean
meta-test βœ“

project-test (projects/project-test):
On branch master
Your branch is up-to-date with 'origin/master'.

Changes not staged for commit:
(use "git add ..." to update what will be committed)
(use "git checkout -- ..." to discard changes in working directory)
modified: go.mod
modified: go.sum
modified: main.go

no changes added to commit (use "git add" and/or "git commit -a")
project-test βœ“

meta git update fails with "TypeError: Cannot read property 'projects' of null" in metaGitUpdate.js:16

$ meta git update
C:\Users\user\AppData\Roaming\npm\node_modules\meta\node_modules\meta-git\lib\metaGitUpdate.js:16
  const projects = meta.projects;
                        ^

TypeError: Cannot read property 'projects' of null
    at module.exports (C:\Users\user\AppData\Roaming\npm\node_modules\meta\node_modules\meta-git\lib\metaGitUpdate.js:16:25)
    at Object.<anonymous> (C:\Users\user\AppData\Roaming\npm\node_modules\meta\node_modules\meta-git\bin\meta-git-update:13:32)
    at Module._compile (module.js:635:30)
    at Object.Module._extensions..js (module.js:646:10)
    at Module.load (module.js:554:32)
    at tryModuleLoad (module.js:497:12)
    at Function.Module._load (module.js:489:3)
    at Function.Module.runMain (module.js:676:10)
    at startup (bootstrap_node.js:187:16)
    at bootstrap_node.js:608:3

meta git remote

Implement git remote sub-command. I would think at the minimum the following sub-commands would be useful.

  • git remote -v
  • git remote show origin
  • git remote rename oldname newname
  • git remote rm name

meta git ls-files

πŸš€ Feature Proposal

meta git ls-files [<file>...]

shows files under control version in all meta repositories

Motivation

To have a easy way to see all files that match with a given pattern in the repo and sub repos

P.S.

Thanks for the tool! It is great!

One of the best solution to the "coordination of repos" problem. Better than git submodules and other official approaches

Commands against a subset of repos

πŸ€“ Question

(You must search the issues before asking your question. Please consider asking in Gitter first.)

Sorry havent used gitter before, couldnt find gitter.im/meta it on their webpage.

Is it possible to have a meta git command run against a subset of the repos defined in the .meta file rather than all of them? For example if I want to create a branch in 3 out of 10 repo's is this possible with the meta git plugin?

Thanks,
Damian.

meta git commit broken on windows

space/quote detection seems to be broken, or quotes are not being placed around subcommand:

$ meta git commit -m 'bumping to message-bus.7' --include-only Mercury,dataflow,data-ready-svc,kronos,echo,trident
'C:\Program' is not recognized as an internal or external command,
operable program or batch file.

Can't use the --set-upstream option

Hi,

I use the following command to push and set the origin of a branch :

meta git push --set-upstream origin 1.3.x

But I got the following errors in each of my modules :

my_module:
fatal: The current branch 1.3.x has no upstream branch.
To push the current branch and set the remote as upstream, use

    git push --set-upstream origin 1.3.x

my_module exited with error: Error: Command failed: git push 1.3.x --set-upstream origin

It looks like my push command has been transformed by meta in a bad way.

Meta version : 1.0.48

Thx

Problem running `pull --rebase origin master`

Hello!

I've encountered consistent problem, while trying to run typical git pattern. When running meta git pull --rebase {remote} {branch}, git-meta instead runs git pull {branch} --rebase {remote}, which is not a working thing.

Git version 2.17.0
Os: MacOS 10.13 (Darwin 17.7.0 Darwin Kernel Version 17.7.0)

Here's specific example output:

➜  meta git:(feature/xxxx) βœ— meta git pull --rebase origin master

meta:
fatal: 'master' does not appear to be a git repository
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
meta: command 'git pull master --rebase origin' exited with error: Error: Command failed: git pull master --rebase origin

I would like to deal with issue on my own, since it will make my life much easier :)

  1. Please confirm it's a bug, or it should be done in some other way.
  2. Maybe there are any use cases, when this behaviour is correct, so I do not miss them?
  3. Any recommendations on contributing to the code are welcome, but not mandatory :)

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Rate-Limited

These updates are currently rate-limited. Click on a checkbox below to force their creation now.

  • chore(deps): update dependency husky to v9
  • chore(deps): update dependency prettier to v3
  • chore(deps): update dependency pretty-quick to v4
  • fix(deps): update dependency commander to v12
  • πŸ” Create all rate-limited PRs at once πŸ”

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Ignored or Blocked

These are blocked by an existing closed PR and will not be recreated unless you click a checkbox below.

Detected dependencies

npm
package.json
  • chalk ^3.0.0
  • commander ^2.20.3
  • debug ^4.3.2
  • get-meta-file ^1.3.5
  • loop ^3.3.4
  • meta-exec ^1.4.2
  • meta-loop ^1.2.2
  • @commitlint/cli 12.1.4
  • @commitlint/config-conventional 12.1.4
  • commitizen 4.2.4
  • cz-conventional-changelog 3.3.0
  • husky 6.0.0
  • jest 26.6.3
  • prettier 2.3.1
  • pretty-quick 3.1.0
travis
.travis.yml
  • node 10
  • node 12

  • Check this box to trigger a request for Renovate to run again on this repository

Injection vulnerability

Not a bug report but a notification of a security issue

$ npm audit | grep -B1 -A11 Critical
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Critical      β”‚ Command Injection                                            β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ Package       β”‚ meta-git                                                     β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ Patched in    β”‚ No patch available                                           β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ Dependency of β”‚ meta-git                                                     β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ Path          β”‚ meta-git                                                     β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ More info     β”‚ https://npmjs.com/advisories/1457                            β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
$ git log -n1
commit 1b727d56b7f09d3f27788ac02346f184622d36de (HEAD -> master, origin/master, origin/HEAD)
Author: Renovate Bot <[email protected]>
Date:   Tue Jun 8 22:39:39 2021 +0000

    chore(deps): update dependency trim-newlines to 3.0.1 [security]

Run git commands on all branches

πŸš€ Feature Proposal

Run git commands on all available branches using something like --all-branches.

Motivation

Working on a project with many repos, I often find myself working on multiple branches of the same repo when I collaborate with multiple members of my team. It would be nice to have a simple way to see all the local changes I currently have on all those branches in a simple way.

Example

➜  meta-repo git:(master) meta git status --all-branches

/path/to/my/repos/repo1: 
On branch master 
nothing to commit, working tree clean
/path/to/my/repos/repo1: βœ“

/path/to/my/repos/repo1: 
On branch feat-1
nothing to commit, working tree clean
/path/to/my/repos/repo1: βœ“

...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.