Git support + the new integration with GitHub is in the process of rolling out!
When the feature is enabled for you, we'd love to hear how we could improve, and what additions you'd like to see.
feedback so far:
"is there a way to create a .gitignore file? I tried making one but nothing happens when I press enter."
We're working on supporting this soon!
"Is this live? I don't see the git sidebar. Is this an explorer-only feature?"
We're currently in the process of rolling the feature out to everyone. Some users have it enabled currently.
My Repl won't commit anymore. Every time I try, the page reloads and it didn't push. The commit also doesn't show up on my GitHub project.
Ditto. Correctly identifies files with changes, but incorrectly states branch is up to date (all commit/push attempts fail). Tried creating a new branch as a workaround, but that functionality appears dead as well. ?!?
@replitjeremy kindly emailed me with the following solution:
This issue occurs when git is exited in the middle of doing some action. It creates an index.lock file in the .git folder of your project that prevents future commits.
Can you try opening the shell (cmd/ctrl + "." -> type "shell" ) and running
rm .git/index.lock? I'm having trouble tracking down exactly what causes this. Have any of the following things possibly occurred?
- working with someone on this repl via multiplayer and trying to simultaneously commit
- closing the repl while a git action was still loading (the sidebar would be greyed out at that time)
- being forced to reconnect by us while using git (the editor will reload and show "offline" briefly, and then a reconnect message will appear)
Nice stuff, now i can upload and edit files more easily.
Works very well and the updates are sent almost instantly, and when you change something from github you can pull merge.
8/10 waiting for new features!
@replitjeremy I've played a bit with the new version control features and they're so cool and well designed my grin doesn't want to go away. Here are some initial impressions and suggestions.
I'd prefer Repl.it to optionally not access any organizations and related repos I'm a member of but I don't own. And I'd like to pick which email address to use for commits among the ones registered with GitHub.
When creating a repo it would be useful for Repl.it to optionally add a well stuffed, language-sepcific
README.md file (like GitHub offers at repo creation), as well as a
LICENSE file with the default Repl.it license (MIT, if I recall correctly).
When the REPL detects changes to the source files and the repo origin is Repl.it, there's a
Commit & Push button in the commit dialog. Maybe I'm not too familiar with the Git/GitHub jargon and the way these tools work, but I'd expect the action to also synchronize (push?) the local Repl.it changes with the remote GitHub repo. Instead I have to switch the origin to GitHub and click
Push in the commit dialog.
This is a minor source of confusion though and, once clarified, it's no longer an issue.
Hey @PaoloAmoroso, thanks for all the great feedback!
I'll try to break it all down and address it here:
1. Repl.it accessing orgs/non-owned repos
We'll only ever access repositories that you connect to on Repl.it, and will never do anything related to GitHub data without an explicit action on your side. Also, if you don't own or have push access to a repo, we won't have permission to let you edit that code from Repl.it either :)
pick an email address to use with GitHub
We are planning to support this!
.gitignore, README.md, and a LICENSE file
we'll be adding support for hidden files soon, which will allow us to give the option to auto-include a .gitignore
currently working on a checkbox to add a README when you connect to GitHub
great call on the license file, I'll look into that
confusion about pushing locally vs. to GitHub
We're removing the dropdown, so that once you connect to GitHub, any push will go there as well without requiring extra user action.
@replitjeremy The dropdown is gone from my Repl.it test REPL, now there's a
Connect to GitHub button. After clicking it I click
Create GitHub repository and get the error
Unable to create a GitHub repository Let us know if there is an issue. The GitHub repo I initially created from Repl.it is still on GitHub.
@replitjeremy I actually did nothing special after setting up a fresh REPL to test Repl.it's new version control features.
I created a fresh REPL, went through the Repl.it version control set up flow to give Repl.it access to my GitHub account and create the repo there, and did a few commits. When I came back to the REPL after you said you were going to remove the Repl.it/GitHub dropdown, the dropdown was indeed gone and clicking the option to connect to GitHub issued the error I mentioned earlier.
Is there a way to request this for my account? I'm teaching a class and interested in seeing if this could work for our students.
My github commits were working just a while ago and suddenly it stopped working. I cant commit to github repo anymore. Is there any particular reason to this? Is there any limit imposed on the github commits for the free version? Thanks
+1 to this feature (thanks!) but I came across what seems to be a bug after creating a new repo from Repl.it, and then found Repl.it failing to pull work committed elsewhere, with the following actions:
- Create new GitHub repo from existing repl
- Clone repo and work on repl’s main.py file locally, pushing changes to GitHub
- Attempt to pull to Repl.it from GitHub seemingly fails. Repl.it claims that it’s “1 commit ahead” which is impossible as it’s at the initial commit that was published to GitHub. Repl.it says it’s 10 commits behind GitHub (when it was ~30).
- Manually pulled and merged in the Repl.it console, with Git claiming the histories were unrelated. Resulted in this merge commit, which merged the Repl.it status (the initial GitHub commit) with the tip at GitHub.
Has been working great for a while now. I've used it on a couple of projects in the past but now every time I want to push/pull a commit it asks for GitHub permissions. I've never revoked permission for Repl.it on my git account and when I check GitHub it says Repl still has all permissions.
- In Firefox, changing files in the terminal causes the GitHub panel to gray out and not reactivate until something happens to poke it (reload as a last resort).
- If I add commits using the terminal, it says "up to date with <branch name>" but this isn't true. I need to commit and push using the sidebar for it discover it's out of sync. There's no way to push without committing?
I'd like to second the request to be able to choose username and email address used for commits.
In particular, if you've got "don't share my email address" selected as an option in your github repository, repl.it can't push any changes (as they're attributed to your private github email address).
Great new features, still advising colleagues to use Repl.it when programming in their free time! :)
What bugs me about version control is that I don't see how I can merge a branch with another.
Aside from the existing master branch I created a develop branch. When I wanted to try out something more on that, I created an experimental branch for my repl/repo.
Then the feature I wrote on the experimental was ready for the develop branch but I didn't find any button for that merge action which to me seems to be standard in version control - otherwise I'd have to copy all code from experimental to develop once it's advanced enough and then make a new commit to develop.
Am I missing something? Sorry if that's been asked and answered before and thanks in advance!
glad I could provide some helpful feedback!
I connected my github after struggling with finding a merging option which obviously made no difference to my problem.
So without merging what's the point of different branches after all? To just work on them separately and copying something you could need from one branch to another (which on mobile devices is even impossible)? :D
Sounds good, thanks for that and keep up the good work!
@ma173 The idea when we built the GitHub integration is that you would push branches to GitHub and merge them as pull requests. This is a very common way to contribute to open source projects which was one of our goals for the feature. Doesn't make quite as much sense for a personal project though!
@jeremypress oh sure, forgot about GitHub supporting pull requests. And true, not that recommended for a personal project. But I just recognized the pull function in repl.it which I must've missed when coding on my smartphone (not the best coding environment, I admit). This makes versioning at least a bit easier :)