Home Download Buy Blog Forum Support

Git change branch like project switching

Git change branch like project switching

Postby n00ge on Thu May 09, 2013 3:01 pm

I'd love it if I could switch branches in a project and have it act like switching a project in Sublime. Meaning, I'd like to have a modal dropdown to choose which branch I'm switching to and when switching, have it change which files are open to whatever the last state was when I was in that branch. How much work would something like this be?
http://twitter.com/n00ge
Sublime Text 3 dev builds | OS X 10.8.2 & Ubuntu 13.04
n00ge
 
Posts: 139
Joined: Mon Oct 05, 2009 1:23 am

Re: Git change branch like project switching

Postby skuroda on Thu May 09, 2013 6:14 pm

I think it's more likely that a plugin does this, rather than ST core. Though it would be done with the quick panel rather than a modal dropdown.
skuroda
 
Posts: 676
Joined: Fri Oct 05, 2012 8:11 am

Re: Git change branch like project switching

Postby espekia on Wed Jul 10, 2013 6:25 pm

Just found myself wanting this, nice to see there's interest in it. Couldn't find anything which does it, so I might create a plugin over the summer if I find the time.

I use Git from the command line though, so I was thinking that the Sublime plugin would just monitor the current branch and silently update which files are open when the branch changes, rather than using a Sublime command to trigger branch changes. I guess both could be supported, with the option to switch between the two as a preference.

You'd want to preserve as much state as possible – preserving open files is essential, but scroll position in each file would be nice as well. Never looked at the Sublime API so I'm not sure how difficult that would be.
espekia
 
Posts: 1
Joined: Wed Jul 10, 2013 6:19 pm

Re: Git change branch like project switching

Postby layne on Wed Jul 10, 2013 8:52 pm

There are already many plugins for Git support.
I think the easiest way would be to fork one of them and implement the missing "save workspace" feature.
// my Blog //
layne
 
Posts: 39
Joined: Tue Jan 04, 2011 3:00 pm
Location: NRW // GER

Re: Git change branch like project switching

Postby wwwsevolod on Mon Jul 15, 2013 6:26 am

im currently workin on that kind of plugin, i think i finish it in month or so.
There are missing feature in sublime api - save workspace and change workspace (but functionality in sublime text is ready).
if i could use this things through API i would finish that plugin in a day or two, but i needed to implement this myself. :(
wwwsevolod
 
Posts: 17
Joined: Thu Feb 21, 2013 11:19 am

Re: Git change branch like project switching

Postby Swimming_Bird on Wed Sep 04, 2013 6:54 pm

Did you ever find those API's I"m really interested in having easy switching of workspaces.
Swimming_Bird
 
Posts: 15
Joined: Tue Sep 06, 2011 3:55 pm


Return to Ideas and Feature Requests

Who is online

Users browsing this forum: No registered users and 3 guests