Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Idea: Add "sync workspace with GitHub repositories" button #897

Open
sanjayankur31 opened this issue Jan 24, 2024 · 0 comments
Open

Idea: Add "sync workspace with GitHub repositories" button #897

sanjayankur31 opened this issue Jan 24, 2024 · 0 comments
Labels
C: backend backend related C: frontend frontend related C: workspaces D: development On development deployment T: enhancement New feature or request
Milestone

Comments

@sanjayankur31
Copy link
Collaborator

Now that we're using Git for the GitHub repositories, it's quite simple to update the files in the workspace. From the UI, of a user selects the same files/folders again, this is already done for them. But it could be also done from the workspace side of things with something like this:

  • find all folders in workspace with a .git folder ---these are GitHub repositories
  • enter these, run git commit -a .. to save the current state
  • update the files in the repository: run git checkout <branch> * (this may fail if the user has created new files that are not tracked by the repo, though, not sure if there's a way around this---we could just show a message with "failed, you probably have modified files in there" or something like that)
  • git commit -a

The only issue I see here is that we don't track what branch a folder in the workspace was created from anywhere in the workspace---that information is only available in the repository. Before creating the new branch for the user, we could also checkout a new osbv2-orig branch that we can then use in the future---it will indicate what branch the folder was created from?

The remote is available now as origin, and we could also tweak our github-copy to rename the remote to osbv2-original or something like that just to make sure things don't fall over if the user decided to change the URL for origin to their private fork or whatever.

@sanjayankur31 sanjayankur31 added T: enhancement New feature or request C: backend backend related C: frontend frontend related C: workspaces D: development On development deployment labels Jan 24, 2024
@pgleeson pgleeson added this to the v0.7.6 milestone Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: backend backend related C: frontend frontend related C: workspaces D: development On development deployment T: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants