1. Bitbucket
  2. Public Issue Tracker
  3. master
  4. Issues

Issues

Issue #516 resolved

Repo-Backed Pastebin / Gists (BB-672)

Tyler Hicks-Wright
created an issue

I love gist [ http://gist.github.com/ ], but I don't want to use github if I don't have to. Can we have a Mercurial backed pastebin?

Comments (246)

  1. Benjamin Pollack

    I'd also really like this feature. pastebins are just a really common tool for most developers, and although I keenly appreciate that it's not strictly a Mercurial thing, I think that it should be a bitbucket thing.

  2. Jesper Noehr
    • changed status to open

    OK, lets settle this once and for all:

    I am not keen on this idea, because:

    • There are 60.000 pastebins already.
    • I don't see any point what-so-ever in backing a pastebin with a DVCS.
    • If we do one, it will be very basic, but I'm sure people will ask for IRC bots and other features we don't want to do.
    • There are 900 other more productive things I could spend my time on.

    So, whoever feels strongly about this, I urge you to make your case for this feature. What I'm looking for is:

    • A couple of good, non-exotic, use-cases where not only a pastebin on Bitbucket, but a DVCS backed pastebin would solve a problem, and/or
    • A good reason for having this.

    None of these should be very difficult to answer, seeing as Github has Gist, and if its so damn amazing, there must be tons of real-life examples of where this has been used for good.

  3. Tyler Hicks-Wright reporter

    The main reason I would like to see it here is that I want BitBucket to be my main source (pun regretfully intentional) for code storage.

    The normal function of a pastebin certainly doesn't require it be backed by a DVCS, but there are a couple things you can get from it:

    1. Version history of changes. If I have a snippet of code that is associated with (but separate from) a project, I can keep it up to date and track changes.
    2. If someone decides they want to work on it more, they can fork it into their own pastebin or if it starts growing, it can be forked into a full repo.
    3. Other systems can tie into it, like Ubiquity and Gist, I could see making BB be a nice place for Greasemonkey scripts to reside. Greasemonkey could know to allow installing scripts from the pastebin, and could use the versioning to check for updates.

    While I hesitate suggesting an implementation without seeing the actual code, it seems that this would be a like the Wiki, minus all the formatting code.

  4. Jesper Noehr
    1. Most pastebins already have an "annotate" feature.
    2. How often does this happen, really?
    3. So it's not really a "pastebin" per se, it's more of a versioned persistent snippet storage. What if you store a Greasemonkey script there, and someone goes and changes it to be something malicious?

    Not trying to invalidate your arguments, I'm really wondering.

  5. Tyler Hicks-Wright reporter

    Fair enough. Thinking about it more, it's a nice-to-have, but frequent uses of it would require that it be adopted by other projects as a defacto snippet/script location.

    If I saw more people supporting it, I'd push harder, but I'm kind of hearing crickets...

  6. Ches Martin

    I agree precisely with the sentiments here. I've never seen the point of Gist, except exactly as tghw said, it's kind of nice to have things under one roof and have tools like editor plugins reference my git config and use an API key to make private pastes without me needing to manually authenticate or interrupt what I'm doing at all.

    It's definitely more useful to me to think of a snippet repository rather than a pastebin. That's what I never got about Gist -- why is each paste a repository? Granted I don't use git a ton, but I have never once made use of a Gist paste as a repo. Now, one repo for my snippet collection, reachable by API/standard Hg mechanisms, could be really cool. I always liked the idea of Snipplr.

    But yeah, I think there are many other things I'd rather see you guys putting your effort into for the time being.

  7. Ches Martin

    The wisdom of Anonymous' conclusion about Bitbucket has left me speechless. Really, what good is this whole thing without a pastebin?

    Further, his input on why this is such a killer feature has truly opened my eyes.

  8. Rahul Dave
    • changed status to new

    I'll ask for a simpler feature on the wiki: to be able to point the wiki's source code highlighting facility to a file in the project's repository, in a fashion that includes the file (rather than linking which we have already). This isnt a gist, but achieves a similar result in a DRY manner. Use case: i have a project with checked in ontologies and want people to be able to read the files, lines of files, or line ranges inline (really the first would do).

  9. Rufus Pollock

    Another big +1 for this. Gist *is* a really useful feature -- the big difference from a standard pastebin is:

    1. it's right next to my code
    2. it's more persistent (or feels so)
    3. you can structure discussions/comments around them
    4. they are versioned
    5. You can interact with them from command line tools (mercurial!) - no need to copy and paste into the wiki
  10. Jake Basile

    I think this is a great idea, if for nothing else than to keep all my code in one spot. It would also help to get the word out about Bitbucket, simply by having a simple place for people to share code. Lastly, you could have the pastebins locked the same way as repositories, so that you can share it privately.

  11. Anonymous

    My idea is similar to #12

    A facility to point at a file(on tag/revision) in a 'include' box that is embedable on the wiki and off-site. Then i can just use the rest of the native tools in bitbucket to manage snips. (example, i can just create one repo of all my snips for my own management)

    Potentially this could be done by thirdparty tools for offsite, though being able to use it in the wiki would be great.

  12. Justin Hart

    I wrote #21 (didn't realize I wasn't logged in) - and greatfully recind the request - this functionality is already available with the 'embed' tag. I'll happily use that :-)

  13. Anonymous

    I think this is a great idea. I pointed my PHP professor to Gist without even realizing that it also versioned pastes. The fact that my instructor can rig Github and use it as a tool for instruction by creating different versions of various lessons makes Github and Git even more valuable. Not to mention the fact that exposing new programmers to the idea of version control is a good thing.

    Heck I decided to use dotcloud to setup a PHP environment just for my current course. Now I'm sure that the people behind dotcloud or Heroku probably were not thinking about the educational utility of their services when they created them. But that certainly does not change the fact that they are very useful for this purpose.

  14. aragost Trifork

    While I also don't see the point of a versioned pastebin, I think it would be a good addition for Bitbucket from a pure marketing point of view: If Bitbucket provides more tools needed by developers, then more developers will talk about Bitbucket and refer others to it.

    Right now there are tons of links to https://gist.github.com/ (even links to Mercurial extensions) and I would frankly prefer if they pointed to Bitbucket instead.

  15. Richard Shea

    +1 because there may be 60,000 pastebins already but I like ...

    "My Code" => bitbucket

    ... rather than ...

    "My Code" => "oh hang on which pastebin did I put it in again ?"

    ... also because allowing bitbucket GIST urls (maybe "bits.bitbucket.org" ?) to float around provides a good way of elevating peoples awareness of the existence of bitbucket.

  16. sait

    I'm absolutely in favor of a good code snippet tracking and sharing system, but perhaps there's a way to get more bang for the buck... if Bitbucket allowed online editing of source files, I could make as many "bastebin" repositories as I want using the existing systems. The tools are already there to share those repos with my team, or the world.

    I'm still in favor of a dedicated service though, similar to Gist.

  17. Stefan Oe.

    IMO what makes gist much better than just another pastebin is not only is every gist a git repo but you can easily embed gists into other sites by simply copying a link. Your gist will then be displayed very nicely with code highlighting and copy to clipboard feature etc.

    I think this is just awesome for tutorials and similar stuff. With gist you can just create a couple of gists for all code examples and embed them into the tutorial. Not only do you get the UX-features of gist for free you can also make corrections and have a versioned history. People can even clone it to submit patches.

    Personally I also like to use it for code I want to preserve but don't consider an actual project. I think it would be great if bitbucket added this feature.

  18. joel

    I would also love this, and I think bits.bitbucket.org is an awesome name.

    One thing I've always wanted from gists is the ability to easily create them while browsing a repo. Sharing code without having to copy/paste would be cool. I'm imagining there would be a button "Bitify" or something when browsing any given file/commit.

    Bitify -> *Make Edits* -> Create Bit

  19. Christopher Case
    • changed status to open

    Let me try to list some actual use cases. (I like the idea for calling these 'Bits', so I'm going to use that term here.)

    (Also, I'm assuming here that Bits can be associate with projects, as well as standalone. I think that having a 'Related Bits' tab for projects is needed.)

    Lightweight Repo

    Let's face it, a Bit is basically a lightweight repo. There's only a single file, with no wiki, no issues. It's less a pastebin (which I frequently use to send hunks of code to other people for comment/sanity checking), and more a single file repo. There's a couple reasons for wanting this:

    • It's significantly simpler to setup. I just hit 'Make Bit', paste in some text, add a name, and I'm done. I can then continue to make modifications to it, as needed, and I get all the wonderful benefits of using a hosted repository, and I set it up in seconds.
    • Install scripts and workaround scripts don't always belong in a project. There's several instances where I've seen full (200+ lines) scripts pasted into a code block on a wiki because it was to so specific to a given use case that it made no sense to include it in the project proper, but without it, the use case couldn't be satisfied. This is the perfect time to use a Bit; Simply link to it from the wiki, and then you can have a full history of the file without the wiki's history getting in the way.
    • Not all projects are created equal. Imagine, for a moment, that you use a project that works beautifully, and is actively developed. However, the developer has an irrational dislike of Apple computers. Even though the project runs great on your apple, installing it is a beast. The project maintainer refuses to add your handy apple install script. Right now, your only option would be to: 1) fork the project, and keep it up to date, all for a single script. 2) maintain a script in an external pastebin, and hope people can find it, to use it. Instead, you could make a Bit that was related to the project, and all you have to maintain is your script, not an entire fork of the project. It would show up under 'Related Bits', and users would have a much better chance of finding it.

    (There's more, I'm sure, but it'd end up just being me going through the top 1000 or so gists on github, and seeing how/why people are using them.)

    Already, I'm hearing, 'how often do any of those things happen?' Well, each of those have happened to me, more than once. Heck, I'm currently maintaining a repository of a single bash script for converting bzr to mercurial repositories. I don't need a wiki, or issues, it's just a convenient script to work around issues with converting bzr branches. The only reason why it's not a gist is because I hate git, and actively try to promote BitBucket whenever possible. As for the others, I could dredge up specific examples... but the point is, it happens more often than 'never'.

    Uber Pastebin

    I'm aware that there are a bunch of great pastebins out there. But, for the most part, they all have a couple of less than desirable 'features':

    • Paste Expiration. Either you have to manually set 'doesn't expire', or you simply aren't allowed to.
    • Untrustworthy. I don't know about you, but I trust BitBucket to have near 100% up time. My pastebin site? Not as much. I've been bit by pastebin.com being down a few times. I just trust BitBucket more.
    • All pastes are communal. Pastebins are a bit like bathroom stall walls; people write whatever they want, and whatever you write is lumped in with everyone else. Often there's no enforced user system, and discover-ability varies widely.
    • Ad driven. Most pastebins are ad driven. Which is fine, except I'd rather not look at adds when I'm trying to code, thank you. BitBucket is nice like that.

    So BitBucket Bits could be a way of solving that. You could track what Bits a user has posted, what project they relate to, they'll have the same lifetime as a project, and you don't get ads. What's more, you can have forking/pull requests (Show me a pastebin with forking/pull requests. That isn't Gist.) Simply put, you can have it be crazy powerful, in ways a normal pastebin can't.

    Also, you could add in-browser editing, like github has for files, and suddenly you have entire scripts being able to be written, edited, and shared from BitBucket. You never need to work with source control. That's pretty nice.

    Other Considerations

    There's a few unrelated considerations here. I'll try to make them make as much sense as I can.

    Business Case

    BitBucket is run by Atlassian. Ask any of the business managers there if there was a choice between sending users to an external site, not associate with Atlassian, or sending them to an internal BitBucket page, which would they prefer? Any manager worth their salt will always choose the internal site. Why? Because it keeps the Atlassian logo in the user's peripheral vision, and keeps the associate in their mind. Everyone who's taken a business class knows that if you can keep consumers using you for their needs, you will drive sales of your other products up, because users who use you for x, and y, will be more inclined to choose you for z, and some other guy. It's the secret to Microsoft and Apple's success. (It's also part of why ubuntu has their own pastebin now.)

    Also, you have to remember that perception has a good deal to do with it. I introduced a coworker (who uses GitHub for some large projects) to BitBucket, and after using it a bit, I asked his thoughts. He replied with "Well, it's basically GitHub, without as many useful features. I don't see the point." I asked for elaboration, and he said that GitHub seemed to have all the features he might ever want; BitBucket seemed to be missing several useful ones. Like Gist. "I mean, for mercurial, sure I'd use it. But I'd never leave GitHub for my git projects... which is kinda annoying, because I don't want two sites for my code." He perceived BitBucket as being 'pointless' for git projects because GitHub was 'better'. Who knows how often he uses those features, he sees them missing, and there's nothing about BitBucket to offset that, except mercurial support. Closing that gap is something I think BitBucket wants to do.

    Users will use it

    Really, in the end, it doesn't matter if you understand why people want it. What matter is, 'will users use it'? Well, 380,988 gists in 63 days (https://gist.github.com/gists) says that, yes, there is a demand for systems like this, which integrate with version control.

    In the end, does anything else matter? If people will find it useful, and they obviously find paste-bins useful, why the heck is this even a discussion? Is it worth BitBucket's time to make yet another one? Yes. Why? It will get used. And isn't the goal here to get more people using BitBucket? Who cares what for... You want to drive use of the site. Adding Bits will do so. Case made.

    And, really, how much work is it? Two Man-Months? If you really don't want to spend the time, I'll sign an NDA, and add it for free. What do you have to lose?

  20. schadeck

    @Chistopher Case - I think was an excellent explanation on why bitbucket should have gist-like funcitonality. It feels like a disservice to the the mercurial community to not have something like this on bitbucket. +1

  21. Alexander Smith

    I'm just thinking it's a must to compete in the long run for bitbucket. I'm seeing gist blocks all over the internet because a lot of the opensource web projects use it for their docs. Bitbucket is great but a lot of people only really use it for private repos and still use github for public ones. Personally I would love to have it all in one place but bitbucket needs features like this to do that.

  22. Pi Delport

    +1 for a snippet feature like this, and +1 for Christopher Case's excellent motivation.

    Gist should not be thought of as a "pastebin": it's a lightweight snippet repository that is still robust, persistent, versioned, owner-attributed, and forkable, filling a niche in-between a transient pastebin and a fully-fledged, invested and committed project repository.

    My own recent example of Gist's utility: Eli Bendersky wrote a post about a technical talk, and the discussion prompted a quick Python implementation in this gist, followed by a couple of implementation variations in this fork, and some more discussion. Without Gist's forking, and the ease with which i could check out the gist, make changes in my editor environment and push it back up, this comparing of notes would not have happened, and the result would not be online for easy commenting and reference in follow-up discussions as it is above.

    In addition to acting as a collaborative notepad like above, a system like this is also ideal for storing random stand-alone configuration files, scripts, hacks, workarounds, and any other little odds and ends that you'd want to keep in an online repository of some sort, but are too trivial to warrant a Bitbucket project repository of their own. I found this ticket while looking for a quick place to put this working file, but now it's on Gist. :)

  23. Iain Learmonth

    I discovered today that BitBucket offers mercurial as well as git, which is great as I'll be starting to use mercurial soon. Then I discovered that I get both unlimited public repos and unlimited private repos which is great as I'll be able to set up a private repo for my dissertation project next year. Then I discovered that there is no "gist-like" feature. So, here's my reasons for wanting such a thing:

    • I would like all my stuff in one place. I'd rather set up my own mercurial server and write a gist-like system myself than split my code between two DVCS hosts.
    • I use gist to store my writing "works in progress". It's not just for code, the ability to have Markdown documents in there which are rendered for previewing when you save edits is great.

    See: http://gist.io/3373806

    • I use gist to store code snippets. As a sysadmin, I often write small scripts to do odd things. It's great to be able to place these in a gist instead of creating repositories for them. The whole "zero-setup" thing is great for this.

    See: https://gist.github.com/3406222

    You might have noticed above, the link to gist.io. This and a number of other services have been written to use gist as a backend for various things. gist.io allows the instant creation of zero setup blogs. You just pass it the id of the gist and there it is. All the use cases haven't been discovered yet, but this is where there's a lot of innovation going on at the moment with GitHub. It would be a shame if BitBucket were to miss out.

  24. Peter M. Elias

    +1 for a Gist / pastebin like feature.

    If I may add to the reasoning as to why:

    • Often snippets are across many languages (currently repos only support 1 language for the whole repo) and it seems excessive to create separate repos for separate snippets.
    • When integrated with Team repositories they make for an EXCELLENT code review tool because you can immortalize a workable snippet for future and past developers to use as reference when trying to get a team up to speed on a project-concept and/or convention.
    • Really helpful for configuration files (especially environmental ones, not project ones)

    Token restatement of empirical points of this thread:

    Gist is obviously loved and heavily used, this feature will increase BitBucket usage => more customers => Step 3 (profit)

  25. Leigh Stewart

    +1 bitbucket is for storing and managing changes in code, incl. code snippets. why make me use two separate solutions for this, with two separate histories. we're talking sort-of micro-repositories here...

  26. Ches Martin

    Folks, please, think of the kittens -- some of us have been following this issue for two+ years, and really would like to know if there is ever an official update on it, but we could do without getting regular email notifications from people adding a +1. I think it's pretty clear to Atlassian that it has a lot of votes by now, 54 watchers currently. You can follow the issue without commenting, which I'll bet they will consider a silent vote.

    Thank you, and apologies for contributing to the inbox litter with this message.

  27. Nurettin Onur TUĞCU
    1. There are exactly zero pastebins in Bitbucket.

    2. Code snippets deserve some love, too. Especially code snippets that have to be included in a collaborative development tool like Bitbucket. It's like attaching documents to a project like in a certain pivotallabs product.

    3. Yes, I'm sure github issues are flooded with IRC bot requests.

  28. Martin Geisler

    Please stop with the +1 comments — add yourself as a watcher instead!

    That way you avoid sending out emails to everybody else who watches the issue and you still show your interest it.

  29. prokopst

    I am going to use gists, because this functionality is missing in bitbucket. Please reconsider implementation of this feature, I do not like having the same stuff on more than one service.

  30. Michael McFarland

    Very interested in this feature myself, my use case if is for snippets on my blog. I like the idea of keeping the examples in source control, as well as keeping all my code sources in one place (bitbucket). At the moment I'm going to sign up at github and use Gist, but only because this feature doesn't exist in bitbucket. I'd much prefer to use mercurial.

  31. Simon Martin

    Some feedback from Atlassian on progress for this 'request' would be helpful. There is clearly a requirement / need for the feature and communication with customers is good.

    I'm currently considering how best to provide example source code; so far I've been using a blog and Alex Gorbachev's Syntax Highlighter - but actually gists would be very nice instead and it would be great if my gists / bits could live in the same place as the actual code i.e. BitBucket and not githut

  32. hrj

    Please stop with the +1s, unless you have something more to add.

    Just watch the issue, and that will be a fair indication that you are interested in the issue.

  33. hasufell

    I have to back up a point already mentioned:

    Pastes are often used in gentoo for code review. It's just the quickest way and you can update them, attach multiple files to them, comment on the page directly etc. which is not so easy or impossible for most paste services. Also: many paste services mess up line endings and other stuff. That would not be the case for a DVCS based paste service.

  34. Sohail

    The best case for Atlassian to create a gist for bitbucket is marketing and advertising. My first exposure to github was through gists that I read on various blogs. "What's this gist thing? Hmm, that's very interesting!" I use gists for support purposes sometimes and I'd rather use bitbucket. I don't even care if it's DVCS-backed.

    Also, most of the other pastebins suck and I don't like github. So there.

  35. J. Lewis Muir

    I think a good, non-exotic, use-case where not only a pastebin on Bitbucket, but a DVCS backed pastebin would solve a problem is as follows: I have something small that doesn't deserve its own project, but I'd still like to share it, keep version history for it, and make it easy for others to contribute.

    Here's a blog post by Dave Ray that's a good example:

    JSplitPainInTheAss: A less abominable fix for setDividerLocation

    He created a Java class to do something useful, posted it as a gist on GitHub, and linked to it in his blog post. Other people could clone and modify the gist if they wanted. He ended up making two revisions to the Java source file which can be seen since it's under version control. And, he and others can make comments. Comments can even be easily made about a particular revision since it's under version control.

  36. Casey Boettcher

    I arrived here after thinking that I should save a config file and all attendant thoughts and notes, in the same place where I have my code, rather than, say, my blog (which is consigning it to /dev/null, essentially).

    I don't have a Snipplr (?) or Pastebin account, and don't want one. Why? Because I have a BitBucket account. Here is where I put stuff that I would have put in Pastebin or any other of the "60.000" pastebin-like services that I don't use. I don't need yet another login for an absurdly specific web service (like Pastebin).

    But it's the stats on this issue that inspired me to write this:

    • priority: major
    • status: open
    • created: 2009-02-25
    • assignee: unassigned
  37. Charles McLaughlin

    Hello,

    This ticket is not being ignored. However, the team has chosen to prioritize other features. We had one attempt at implementing this as a ShipIt project, but unfortunately it didn't make the cut. Currently this feature is still not planned on our roadmap, but we appreciate the feedback everyone has provided on this issue.

    Thanks for your interest.

    Regards, Charles -- Bitbucket Staff

  38. Jolly Science

    +1

    Our team could create or submit pull requests for new Bits, and when we find ones we like, we simply include them into a project as a submodule.

    Ideally (if we're dreaming blue-sky), it'd be cool to be able to stage specific pieces of code into 'bits' from a code review. Nothing would need to change in the code being copied, but it would be great to just grab a piece of code and separate it for revisions.

  39. Marco Zanetti

    Do not think that will be helpful also to diffuse bitbucket? If we can post our snipets of code in other forums or social networks many other developers may have knowledge of bitbicket and its great features. It is not only a technical issue but also a marketing issue :)

  40. Garrett D'Amore

    We are paying for commercial use of bitbucket. We have our code here. Unfortunately, we also have some of our QA folks and developers using insecure pastebins (all over the place, may of which are filled with spam, and who knows what nasty javascript things attached) because we don't have an enterprise pastebin.

    We also use confluence, but creating a full confluence page to communicate a single page of error output is too heavy weight. I want to have a UI and process for quickly sharing snippets that is as easy as any of those 60k pastebins, but I want it to be secure -- global access to only those users that I've assigned privileges to in bitbucket.

    The use case and need here is trivial to understand. If it isn't backed by SCM, for my use case that is OK, but given that you have the SCM, and the use cases that others have elaborated here, why not just do it?

    We're seeing gists used everywhere in github. This is a differentiator for github. Why abdicate on this when it would be an easy feature gap to close?

  41. The Art Institute of Chicago

    We would definitely use this feature.

    One particular use case is for passing analytics tracking scripts to 3rd parties who manage our ecommerce pages. We have recently been overhauling our analytics code and because bitbucket has no pastebin we have used a haphazard combination of insecure pastebins and text files attached to emails.

    The solution proposed here would be much preferred, and not only for analytics scripts but for all sorts of code sharing situations that involve 3rd party organizations or contractors.

  42. Michael Lockhart

    Okay I've been watching this for a while, and not wishing to pollute everyone's inbox with comments, but:

    It's been four years since this enhancement was suggested, you've hit 1,000,000 accounts, there are over 130 people watching this, over 100 comments all with use cases. Perhaps you could see your way to implementing this for your anniversary?

    If it is such a big deal to write it, in the face of all the other features you've added since, perhaps you could put it out for some FOSS coders to play with? Or offer a position to a grad' student? There are probably heaps of people in your userbase who have the skills to write it if you can't see a way to do it from within Atlassian... ask for some help

  43. Thomas Leo

    I would love to see this feature, I use gists for keeping notes on all sorts of things. For example I have a gist for how to setup my work environment which I can clone, make changes to, and push back up to github.

    I think the great feature of gists over pastbin's is that they are actual git repositories and they don't clutter up your repositories list (which is great considering there are usually only a few files in a gist).

  44. George Coller

    +1

    Every dev team has scripts, code oneoffs, maven settings.xml, configlets, unix goodies that they want to share easily. There's a reason why gists are so popular. It's time BitBucket!

  45. Zachary Davis

    A few ramblings from a member of the Bitbucket team:

    Yes, we read the comments

    I really appreciate the people who have taken the time to write thoughtful comments outlining their needs and use cases. That sort of stuff can be really helpful as we consider and/or implement a feature. I assure you your comments do not go into a black hole.

    +1 comments are not very useful

    As several people have mentioned, "+1" comments do not provide a lot of value and just spam everyone who is watching. Votes actually carry more weight, since we can easily see/sort by the votes from the issue list view. That's why we built votes in the first place.

    About this feature, and why we haven't done it yet

    Most of you are developers, so I'm sure you can appreciate that there's no such thing as a straightforward software feature. I think a lot of you have made great cases for this feature, and we're continually reevaluating our roadmap and our priorities. But building software is about tradeoffs, and so far we've felt that (given the complexity a feature like this would almost certainly entail) other features would provide more value when implementation and maintenance time are considered.

    Personally I hope we do build this one day, but I also stand behind the features we have built and the decisions we've made. I'm sure we get some things wrong, but overall I think we're doing the right things.

    So thank you to everyone who cares enough to come here and give their input. I hope you keep coming, and I hope you keep speaking your mind, and I hope together we can build great things.

    Zach

  46. Simon Martin

    Yes I am a developer and as a developer I use the tools that support me - tools that don't support me I tend not to use so much. You hope that you build this [feature] one day... one day? So after 4 years there is still no serious attempt to implement this feature. Personally I find that very hard to understand. There are lots of great use cases identified in the comments. As developers we have given you what you asked for, used the voting feature (that you implemented while this feature was being ignored) and been quite patient. What is more important than keeping your users happy? What is more important than remaining competitive (in this case keeping competitive with github).

    From your comment it sounds like you haven't properly evaluated the complexity of this feature because you are unsure about the implementation and maintenance time. So if you don't know how long it will take how can you know that it isn't worth the time. The comments don't go into a black hole? Where do they go, because it appears that they do go into a black hole. The feature has been requested since 2009 and hasn't made it onto your roadmap? Why not? What features have been implemented since 2009 that have been requested as much or as visibly?

    Like many others I want to keep my code in one place and if I encounter a problem doing so will investigate ways to eliminate that problem: 1. Can the feature be added (in a reasonable amount of time) ? 2. Can I add the feature myself? 3. Where else can I get the feature?

    It seems the answer to these questions is: No, No and github

  47. radistao

    +1 comments are not very useful Votes actually carry more weight, since we can easily see/sort by the votes from the issue list view. That's why we built votes in the first place.

    voted

    it's time to start voting for all who made "+1" comment ))

  48. Justen Stepka

    Official update:

    Internally at Atlassian we've expressed in interest in developing this feature as it would greatly help our teams develop software. That said, our focus for the short to medium term, will be to provide SSO and better user management with our OnDemand JIRA and Confluence products. I would estimate that the SSO integration and bi-directional oAuth integration between Bitbucket / JIRA / Confluence / Bamboo will take us well into 2014, at which time we will re-evaluate this decision.

    Cheers, Justen -- Bitbucket product manager

  49. m@

    So in 2014, it will have been 5 years since it was initially requested...and you can continue to say that project X has taken precedence, sorry. We will evaluate it again next year....

    It really is sad that we have to rely on a competitor's product for one little feature, and by putting it off 'until next years evaluation', all you are doing is staving off customers and users. You are making it difficult for developers to be able to rely on ONE product, instead you force them to use 2 different products, or worse yet, force them to go to github for their entire workflow. I don't understand how management can even stand behind that asinine thought.

  50. Kevin Quillen

    It would be great to store gists/snippets without using other services.

    My main reason is sharing between colleagues and team members as points in time for how particular issues were resolved.

    Also, community could build an app like this to really add some utility:

    http://www.gistboxapp.com

    Using pastebin/github/etc for sharing code that isn't on Bitbucket, or save-able, whatever, is awkward.

  51. Tom Anderson

    I'm yet another person who would like to have a good-quality Mercurial-based lightweight service for sharing individual and small collections of files. If it's part of Bitbucket, then so much the better.

    However, i wonder if i can suggest another angle on it: let me create perfectly normal repositories which just don't show up in my list of repositories. Don't let them have wikis or issue trackers. Show the content of all the files on the repo home page, rather than a listing and the readme. Let them have comments - perhaps by repurposing the issue tracker? Show the comments on the home page too.

    At that point, you've pretty much got the functionality of gists, but you've approached it from the direction of lightweight repos, rather than a heavyweight pastebin.

    Really, for me, the only important feature in that list is that the repo doesn't show up in my list of repos. Perhaps this is just a product of the way i use Bitbucket, but the repositories in my list are the things i think of as being my projects. I have put effort into them (well, in theory), i will come back to them in the future, and i want people out there on the web to find and benefit from them. I do not want one-off pastes of scripts or data or little bug-reproduction examples to show up in that list.

  52. Ches Martin

    If one more person posts a "+1" comment without bothering to read the thread and consider how many people are being notified of your useless updates, I swear I will make every effort to find your IP address and DDoS you by any means available.

  53. RD de Blois

    Same here, I've also just stopped watching it because of the ridiculous +1 spam. (Feature request: build in a special filter that warns people before posting a comment containing "+1"?)

    Though of course I'm still interested in this feature, which it would be greatly appreciated. Right now, if I use hg for my projects, I have to juggle between hg for the project branches and git for the gists, which is very cumbersome and annoying. It's a lot better if everything is in one place.

    In particular, one use case that I'd make use of is to tell people to upload a test case for their bug as a gist (/bit?). While still keeping it very easy for the user to upload such a test case, it would allow me to easily check it out from the comfort of my command-line, work with other developers while making changes to the test case, easily share my changes across computers to test multiple platforms, and optionally, perhaps even eventually merge it into our project repository as a test case.

  54. meteormethuselah

    I find it sad that this still has not been integrated even after nearly five years. This type of functionality is not "trivial." it is very useful when attempting to get help in chat rooms or on mailing lists. I only have Github accounts for this functionality and reporting the occasional bug. If Github ever offers native Mercurial support the only thing left that Bitbucket would have is the unlimited private repository support. Somehow I doubt that, that will keep a huge chunk of people from migrating. As the poster above has said it is annoying to have to switch between Git and Mercurial for project code and notes. Let me put it another way: If I liked Git and had to choose between Github and Bitbucket I wouldn't choose Bitbucket as it is right now (Even with the unlimited private repositories which is great.) because Github offers better functionality, through the integration of snippets.

  55. Marcin Krol

    +1, reasons:

    • This is not about having yet another pastebin, this is about keeping safe and persistent long-term snippet collection.

    It's useful for keeping many small things that you need from time to time only. Pastebin entries are temporary, you don't keep them around, but not all small snippets are like that: I keep snippets and things that I tend to forget due to not very frequent use in a one big plain text file. It would be nicer to have it online, shareable, searchable, versioned and syntax highlighted. This is equivalent of notebook, not post-it notes.

    • you can't really link to small auxillary item from code or readmes. A wiki to an extent fulfills this role, but not very conveniently, as it typically fulfills different role: an updateable, online manual rather than a private notebook. I guess it could be used in such role, but people will not form such custom quickly and a dedicated tool like gist for some reason gets associated with this sort usage.

    Characteristics of gist usage is different from pastebin. They're similar in some respects, yes, but very different in others.

  56. Mladen Mihajlovic

    Snippets are a huge part of any developers arsenal, and this would enable developers to keep versions and notes of their many, many common and generic snippets which they probably end up using in all their projects and sharing. Therefore I would say it's is quite an important feature to add.

    I also think that per votes, this issue is 7th most important. Out of the 7 top issues, only one is assigned to somebody? I would think you'd want to give users what they're asking for and not what you "think" they want.

  57. Norman Gray

    Mladen Mihajlovic to be fair, more than half of the top ten issues in that list fairly obviously require significant work or (speculating only mildly) might conflict with assumptions pretty firmly baked into the design of the system. If they were easy and consequence-free to address, they would probably have been addressed already.

    There are several things at the top of that list (including this one) that I'd like to see implemented. Shouting at the developers does not help push ones favourite issue up the list.

    Looking back, I think that the list of comments attached to this issue now present a pretty comprehensive rationale for its implementation. I'm not sure we collectively need to add to it further.

  58. Mladen Mihajlovic

    Norman Gray I did not mean it in any bad way - I was just highlighting the fact that it's quite a requested feature and this ticket has been open since 2009, and also as per the request at the top, many good reasons have already been given. But this is not a discussion board, so I will leave it at that - and keep watching :)

  59. Jim Passmore

    Now that there is functionality to create files from the online interface, we may have the crude analog to gist. If you create a repository (called "snippets" for example), you can create a blank file, paste in your code snippet, and save it. It will obviously be there for your reference. If you want to share, browse to the Source tab. From the file list, copy the link to the file (e.g., right click on file name and select "copy link address" in Chrome). That link can be shared, assuming your repository is public.

    Not all that user friendly, but it's a start...

  60. Web Division

    Jim Passmore 👍 and if I prefer Gist can i login in bitbucket with my Github account. If they are not interested to develop it what is the problem? I use tool that give me what i want: I use SourceTree instead Github with github repo.

  61. Kevin Quillen

    Because it's not about what tool does what or "people should just use GitHub for Gists". If folks are already using Bitbucket, they shouldn't have to jump and use GitHub just to do a gist. That's insanity.

    This app built around GitHub's gist capability is absolutely killer: http://www.gistboxapp.com/

    Bitbucket lacks it, which is sad, because all the snippets I have in GB, the code isn't even on GitHub it's in Bitbucket. If it can't be done at a level where it is simple to use, and shareable amongst organization only, don't bother.

  62. Seth Aldridge

    This issue is 5 years old. It's sad that rather than spending the time it would take to build something like this you just kick the bucket and it never gets resolved. I googled Gists on Bitbucket and found this thread hoping it would be resolved by now. Yet again I'm disappointed by BitBucket's substandard offering from what's out there.

  63. Zackery Douglas

    [~saldridge] said:

    I googled Gists on Bitbucket and found this thread hoping it would be resolved by now. Yet again I'm disappointed by BitBucket's substandard offering from what's out there.

    Same here. At the very least, I would hope that some other Atlassian project would take up that slack.

  64. Ross Smith

    I googled Gists on Bitbucket and found this thread hoping it would be resolved by now. Yet again I'm disappointed by BitBucket's substandard offering from what's out there.

  65. Michael Del Tito

    Ross: I'm just as disappointed as you are that there isn't a Gist equivalent in Bitbucket. Let's keep things in perspective though - what other services are "out there" aside from Github that provide the same functionality and ecosystem of services as Atlassian/Bitbucket?

    Does Github have anything close to Jira? Does that make Github substandard?

    The lack of a Gist-feature sucks, but so does paying per-repo for private accounts on Github.

  66. Thomas Leo

    Can we close this issue? It seems that this feature will not be implemented.

    If you want gists: use Github. If your want free private repos: use Bitbucket.

  67. Ben Madore

    I agree, this should be closed. Except that owuld actually mean someone at atlassian would have to respond to their customers (many of us do pay for this product) - and they seem to be morally opposed to providing any feedback.

  68. Norman Gray

    This is also the 20th oldest open issue in the list, and the only one of the top 100 (at least) that's a minor issue, rather than a major one.

    Closing it would be disappointing, but the case has been made, repeatedly and eloquently, and it has not been persuasive; engineering is all about saying 'no' sometimes (though before anyone says it, yes, an actual 'no' would be nice).

    (I shall now go off and grumble darkly into my beer...)

  69. Ross Smith

    Yeah, let's close it. Because that's how companies become competitive. "Oh, company X has a shiny feature that many people like? How long will it take to implement? More than 2 hours? Well let's not even bother then..."

  70. Yuki Hyou

    Voted, but not watching. I would love this functionlity, if only to have a central location for my private code libraries and (currently) pastebin private pastes.

  71. Sean Stoner

    I pay for bitbucket and manage both ondemand and hosted enterprise versions of the entire atlassian suite. This would be invaluable since I have to go use gist in order to share code snippets with team members ad hoc which is ridiculous. Since I'm paying for it, the comparison of paying per repo vs whatever being discussed above is a red herring. Atlassian, please implement this feature!

  72. Jeffrey Aguilera

    So for 5 years now, the Atlassian team has been complaining that this is just too hard to do, while customers have been harping for it. This could have been done 5 years ago, if it weren't for the defeatist anti-user (therefore anti-agile) attitude.

    Just get this done. If your developers whine and whine about work, maybe you should get new developers. Is there even a PM? The tickets get closed wontfix by a dev??? If bitbucket were free, I could understand the pissy attitude. But it's not.

  73. meteormethuselah

    You know something, being able to collaboratively edit isolated snippets of code (by forking and branching etc) is very useful when trying to get help on an issue. You get something that keeps track of changes with a uniform interface, you don't have to learn another interface when 99% of the functionality desired is already provided by this service of which the remaining one percent is a type of special case of the former. If I ever come to a point where I would consider paying for access to Bitbucket and I did not need integration with something like Confluence I would have no real reason to consider Bitbucket unless the price difference between Github and Bitbucket was ludicrous because without the free unlimited private repositories and product integration Github is actually the more powerful of the two services even with Bitbucket supporting two DVCS programs!

    I do not need to go through the trouble of explicitly creating a repository to store snippets of code or other things I may wish to keep track of on a semi-permanent basis (Like algorithm prototypes.), I can toss things into a gist and then put them into a specific repository after they have become more fleshed out, I can isolate sections of code that I want to show to others without having them see things that are not relevant, the list goes on and on. It really is a shame that we still don't have this kind of functionality

  74. Andrew Swan

    Hopefully all the people who are "+1'ing" this issue are also actually voting for it, because the BB team (like any team) is more likely to look at the total vote count than read through all the comments.

  75. Samurai Ken

    It's been almost what, 5 years for this issue? Just do it guys - seriously. The reasons are simple and very straightforward...

    Gists are extremely common ways to share small bits of code on social media / forums etc. - why give all that mind-share to github when you could so easily have it for yourselves? That github allows them to happen so easily is seen as a HUGE nod to being developer friendly.

    There IS a network effect to source control systems (github and bitbucket) - mind-share matters. That Atlassian seems to willing to not even fight on this front is more disturbing than the lack of the feature.

  76. Tom Roche

    @Samurai Ken: "That Atlassian seems to willing to not even fight on this front is more disturbing than the lack of [gists]"

    Maybe someone @ Atlassian got bought off ?-) I'll bet GitHub had some $ leftover from all that VC ...

  77. Charlie Clark

    Commentable snippets close to the code would be very much appreciated. They could be very useful accompaniments to pull requests where you want to work out implementation details.

  78. Luke Browell

    ok big man, keep your shirt on ;-)

    Maybe we should all stop moaning and write the snippets to implement it... oh hang on, there's no where yet to put snippets on bitbucket.

  79. DennisKvdM

    Hi there,

    I'm Dennis and I'm one of the new Product Managers for Bitbucket. I'd like to give an update on this feature request. We acknowledge that this has been unanswered for a while and we will be giving more updates on a regular basis.

    I'd like to let you know that we're actively working on a paste / "snippets" feature, I'll update this issue as soon as I we have a delivery date.

    Cheers, Dennis Kromhout van der Meer Bitbucket PM

  80. Ross Smith

    Dennis,

    Thanks for finally shedding light on BB's direction. Please consider making your development intentions more transparent in the future. Doing so is really a no-brainer as it's a win-win for developers and BB alike.

    Once again, thanks for letting us know where y'all are headed, we really appreciate it.

  81. DennisKvdM

    Good news everyone! goodnews-1417752451.png

    We're currently testing this feature internally at Bitbucket and we're excited to release it to you all soon, more news to come!

    Cheers,

    Dennis Kromhout van der Meer

    Bitbucket PM

  82. Tom Roche

    @Kelvin Del Monte: "should we ask the Gistbox team to integrate with you?"

    I am not Atlassian, so the following are just my guesses:

    1. Gistbox integration will probably require work on their end, and ...

    2. The major question for Gistbox (et al) integration will be, does bitbucket's API provide the needed interfaces? E.g., this problem probably won't affect Gistbox, but it may give a flavor of how missing API can block integration of bitbucket into useful tools and workflows.

  83. Rui Jiang

    Rui, creator of GistBox here.

    The GitHub API for Gists is really not the reason why I started there. I wanted to tap into a community that was already familiar with sharing out snippets of code. In fact, GistBox's team gists feature is built on our own backend, without any GitHub dependency.

    For BitBucket to be another source of data, the API wouldn't have to be all that complicated:

    • Gist (Name, Owner, Files, Timestamps)
    • File (Filename, Content, Timestamps)

    Perhaps DennisKvdM would be interested in discussing learnings from my work developing GistBox and/or the potential of a partnership?

  84. Marco Zanetti

    Ty Dennis,

    great job and now like you wrote in comments about to embed snippet: "We're considering this for the future if there are are a lot of requests for making snippets embeddable"

    Liam Moat opened this issue #11112, so who is interested in please vote it using vote link on the right box and not using +1 comment ;)

  85. Log in to comment