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

You will regularly need to share log 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 incognito mode is pretty much the same as using an entirely different computer. You should be able to see your code.

    You would share this 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 screenshot of an email message that chops off the right and bottom thirds 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 (the URL in the browser's location bar --- not the clone URL) in your message when you email us.

<> Do not use private snippets for this purpose --- we do not have access to private snippets.

Note that you do not need to use snippets to send us code --- we can already access your code assuming you have committed and pushed it --- snippets are primarily about error messages and stack traces that you want to share.