The following is for applications based on git, e.g Azure DevOps, Bitbucket
It is recommend to open this README in another tab as you perform the tasks below. DevOps has a structure (top->down) organization -> project -> repos etc.. You can watch this video for a full demo from bitbucket. Open the video in a new tab OR view a step-by-step tutorial.
See this guide for .md file format.
For Azure DevOps, do the following:
- Click **Project > im_invivo > Repos (left drop down menu, see figure below) > '+' button (near im_invivo, see figure below) ** and select New repository.
- Choose Git as Type and specify the name for the repo in the pop-up window (see figure below). Others as needed. Click "Create". May need admin permission to do so, contact admin if any problem.
Cloning allows you to work on your files locally. Copy and connect to the repository locally so that you can push updates you make and pull changes that others make.
For DevOps, first create a personal access token as needed, then use it as usr/passwd below; or generate git credential by clicking the top right "Clone" button (see figure below, in high-lighted red box):
git clone https://dev.azure.com/RushAlzheimers
See Clone a repository for details.
You can add, commit, and push from the command line.
Next, add/upload a new file to this repository from DevOps portal.
- Click the specific Repo Files tag on left and then the ... button next to the repo name, choose 'upload' (see figure below).
- Follow the instructions on screen and then click Commit.
- Click Project > im_invivo > Repos from DevOps portal.
- Click the README.md link from the list of files.
- Click the Edit button on top right (see figure below).
- After making your change, click Commit to follow the instruction on screen and you'll see the change you just made.
- For first time user, use "git config --global user.email " to let git know who you are.
- Use
git add/rm -f <file>...
to update what will be committed. - Use
git reset HEAD <file>...
to unstage files that are not transferred/uploaded. - Use
git status
to get the status of your local repository. - Use
git commit -am '<your message>'
to commit change(s) locally. - Use
git push origin master
to push changes remotely. - Repeat steps 2 to 5 after modifying repository files as needed.
- Use
git pull
to obtain files changed remotely. - Use
git remote rm origin; git remote add origin <http>
to switch origin, e.g. from bitbucket to devops. - Update git by this, details under Ubuntu, i.e.
sudo add-apt-repository ppa:git-core/ppa;sudo apt update;sudo apt install git -y
.