labs / tiddlywiki / tiddlers / content / labs / lab02 / _Labs_02_Sharing Code

You will regularly need to share code snippets and error messages when working with other people. Most Git server software like GitBucket (Snippets) and GitHub (Gists) have the ability to do this.

  1. Switch to GitBucket in your web browser.

  2. Click the <

    > button at the top of the page.

  3. Click <

    > to create a snippet.

  4. Enter some text into the large text area. You do not need to provide a description or file name.

  5. Click <

    >. Secret mode allows you to give the URL to other people and they will be able to see the code, but it will not be visible to other GitBucket users. Private mode means that only you can see it, and Public mode means that everyone can see it.

  6. Copy the URL in the browser's location bar. Open another tab using the browser's private/incognito mode, and paste the URL. You will need to log in to GitBucket again, since using private mode is pretty much the same as using an entirely different computer. You should be able to see your code.

    You would share the URL with your team members so that they can view the snippet.

  7. Delete your Snippet using the <

    > button.

If you have error messages or stack traces that you want to share with INFO202 teaching staff, then please use the Snippets feature. We do not like receiving screenshots of text. If you send us a screenshot of text, then you may receive a reply in the form of a blurry screenshot of an email message that chops off the right third of the message (that is pretty typical of the sort of screenshots we get from students).

Create a secret snippet that contains your stack trace (copy/paste it from the NetBeans output pane), and include the URL in your message when you email us.