Cloning and pushing to Bitbucket on CISER - labordynamicsinstitute/replicability-training GitHub Wiki

Setting up (First time)

  • Create a directory "Workspace" under "Documents"
    • This directory will be present on all CISER nodes
    • You might want to add this to "Favorites" or "Quick links", however, those preferences might not be available on all CISER nodes.
  • Ensure you can open VSCode
  • Ensure you can start the Git Bash shell (right-click)
  • Ensure you can "Batch run Stata" (right-click)

Command line

  • Go to the "Workspace" folder.
  • Right-click, open a Git Bash shell

Assuming you are setup on Bitbucket, type

git clone <URL>

replacing URL with a meaningful path to a Bitbucket repo, e.g., command-line clone

(see [Populating_repository_for_replication](Populating a repository))

If private (should be the case for the repos in this project), you should then see the Git authentication window pop-up: command-line clone

You can now modify the files. Once you are ready to add, commit and push,

git add ./README.md
git commit -m 'Minor modification'
git push

command-line clone

You should not be asked for a password in the same session.

command-line clone

Sourcetree

Sourcetree is the free Bitbucket client for git. It is not installed on CISER, but you can use it on your laptop, if you prefer. All the command line instructions above will work on a Git bash shell on Windows, and a terminal shell on MacOS and Linux.

⚠️ **GitHub.com Fallback** ⚠️