Difference between revisions of "VScaler: Using Bitbucket Repository"
Jump to navigation
Jump to search
| Line 71: | Line 71: | ||
new file: hello.txt | new file: hello.txt | ||
| − | |||
</syntaxhighlight> | </syntaxhighlight> | ||
Revision as of 14:00, 14 October 2016
Cloning main repo
- Use the
git clonecommand
Jons-MacBook:vScaler-scripts Jon$ pwd
/Users/Jon/Work/vScaler-scripts
Jons-MacBook:vScaler-scripts Jon$ git clone git@bitbucket.org:bostonhpc/vscaler-openhpc.git
Cloning into 'vscaler-openhpc'...
remote: Counting objects: 130, done.
remote: Compressing objects: 100% (100/100), done.
remote: Total 130 (delta 25), reused 0 (delta 0)
Receiving objects: 100% (130/130), 22.87 KiB | 0 bytes/s, done.
Resolving deltas: 100% (25/25), done.
Checking connectivity... done.Pull down latest info from a branch or master
- Use the
git pullcommand
Jons-MacBook:vscaler-openhpc Jon$ git pull
Already up-to-date.Identify available and currently selected branch
- Use the
git branchcommand
Jons-MacBook:vscaler-openhpc Jon$ git branch
* jon-test
masterSwitch to different branch
- Switch to the top level directory for the local copy of your repo
- Use the following commands:
git fetchto download objects and refs from another repository.git checkout <branch_name>to switch to another branch (and specify the branch name)
Jons-MacBook:vScaler-scripts Jon$ cd vscaler-openhpc/
Jons-MacBook:vscaler-openhpc Jon$ git fetch && git checkout jon-test
Branch jon-test set up to track remote branch jon-test from origin.
Switched to a new branch 'jon-test'Identify changes
- Use the
git statuscommand
Jons-MacBook:python Jon$ git status
On branch jon-test
Your branch is up-to-date with 'origin/jon-test'.
Untracked files:
(use "git add <file>..." to include in what will be committed)
hello.txt
nothing added to commit but untracked files present (use "git add" to track)Add a modified file to your local index
- Use the
git add <filename>command
Jons-MacBook:python Jon$ git add hello.txt- And confirm with
git status
Jons-MacBook:python Jon$ git status
On branch jon-test
Your branch is up-to-date with 'origin/jon-test'.
Changes to be committed:
(use "git reset HEAD <file>..." to unstage)
new file: hello.txtCommit modifications
- Use the
branch commitcommand with-amoption and add a message
Jons-MacBook:python Jon$ git commit -am "Added a test file"
[jon-test 6579eaf] Added a test file
Committer: Jonathan Howard <Jon@Jons-MacBook.local>
Your name and email address were configured automatically based
on your username and hostname. Please check that they are accurate.
You can suppress this message by setting them explicitly. Run the
following command and follow the instructions in your editor to edit
your configuration file:
git config --global --edit
After doing this, you may fix the identity used for this commit with:
git commit --amend --reset-author
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 openhpc-installer/python/hello.txt- Confirm with
git status
Jons-MacBook:python Jon$ git status
On branch jon-test
Your branch is ahead of 'origin/jon-test' by 1 commit.
(use "git push" to publish your local commits)
nothing to commit, working directory cleanPush commits back to web based repo
- Use
git push origin <branch>command
Jons-MacBook:python Jon$ git push origin jon-test
Counting objects: 8, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (8/8), done.
Writing objects: 100% (8/8), 818 bytes | 0 bytes/s, done.
Total 8 (delta 2), reused 0 (delta 0)
remote:
remote: Create pull request for jon-test:
remote: https://bitbucket.org/bostonhpc/vscaler-openhpc/pull-requests/new?source=jon-test&t=1
remote:
To git@bitbucket.org:bostonhpc/vscaler-openhpc.git
4081752..f18e72f jon-test -> jon-test