You are not logged in.

#1 2014-01-13 22:15:06

StreakyCobra
Member
Registered: 2012-04-08
Posts: 8

gws - A helper to manage workspaces composed of git repositories

Hi everyone,

I recently wrote a small bash script for my own needs. I called it gws for Git WorkSpace.

gws

It is a KISS, bash, colorful, vundle-inspired helper to manage workspaces composed of git repositories.

License: MIT
Website: http://streakycobra.github.io/gws/
Github: https://github.com/StreakyCobra/gws

Installation

A package is available in AUR: gws. There is also a git version for development version, just in case someone is interested: gws-git

Briefly

I encourage you to read the README file on github or the github-pages to get started, because:

  1. This is just a very brief introduction

  2. It takes me a lot of time to write it wink

That being said, you start by creating a list of projects on which you are working (with their associated urls) in a .projects.gws file in the desired "workspace" folder:

perso/gws       | https://github.com/StreakyCobra/gws.git
perso/teafree   | https://github.com/StreakyCobra/teafree.git
archlinux/habs  | https://github.com/StreakyCobra/gws.git

Then you can update your repository with:

gws update

That will clone the repositories which don't exist yet. Then you just have to hack as usual in your repositories. After a long day of coding, you probably didn't remember which repositories have changed, which where pushed and so on. This is where the principal command shows up:

gws

It displays (see screenshots below) the state of each repository, allowing you to take action for repositories you think that need it.

You can also share the projects file to have exactly the same folder structure in all your computers for instance. But there is also some other functionalities, like an ignore file and a check command. Have a look at the README to get started.

Screenshots

gws update view
gws status view
gws check view

Offline

#2 2014-01-14 09:17:07

kniren
Member
Registered: 2011-10-12
Posts: 40

Re: gws - A helper to manage workspaces composed of git repositories

This is great! One of these tools that you don't know that you need until you know they exist


Archlinux :: Xmonad
dotfiles | deviantart

Offline

#3 2014-01-16 14:37:55

StreakyCobra
Member
Registered: 2012-04-08
Posts: 8

Re: gws - A helper to manage workspaces composed of git repositories

kniren wrote:

This is great! One of these tools that you don't know that you need until you know they exist

Glad to see you find it useful. I hope you will enjoy it too.

If you want to try, I just added a new functionality: `fetch`, that do a `git fetch` before showing the status of all repositories. For me it is useful when I am going to take the train and I want to be sure to have the latest code on my laptop. I didn't implement it as default for the `status` command because it is quite slow, and require to have ssh-agent installed to avoid reentering the passphrase multiple time for ssh repositories.

It is available in the `gws-git` package right now.

Offline

#4 2014-01-20 19:33:35

StreakyCobra
Member
Registered: 2012-04-08
Posts: 8

Re: gws - A helper to manage workspaces composed of git repositories

Version 0.1.3 is now out.

The changes are the following:

* An `init` command to generate the `.projects.gws` file the first time.
* A `fetch` command to do a `git fetch` on all repositories. It permits to see which repositories are behind origin.
* A `ff` command to do a `git pull --ff-only` on all repositories. This update all repositories from origin if fast-forward can be done.

The package has been updated in AUR: gws

Offline

Board footer

Powered by FluxBB