Live site: https://didsr.github.io/HTT.home/
VS Code: Remote Development over SSH
- Install ‘Remote – SSH’ extension in VSCode: vscode:extension/ms-vscode-remote.remote-ssh
- Click the remote server button in the bottom left corner of VSCode (Icon looks like an unleveled > <)
- Choose “Connect to Host..”
- Enter SSH host: openhpc.fda.gov (port 22)
- Put in username and password of openHPC
- If it worked, the bottom left corner banner will now show the Remote host icon and “SSH: 172.31.151.221”
- Follow all steps prompted by VScode
GitHub Docs: Managing Remote Repositories
Free Code Camp: Fetching Remote Branches
Git: First Time Git Setup
- In the Terminal, use
git remote add origin git@github.com:DIDSR/HTT.home.git
- Verify new remote with
git remote -v
- Add github account information to git config
a.
git config --global user.name “[[username]]”
b.git config --global user.email [[userEmail]]
- Check git branches
git branch -r
- Specify default branch
git config --global init.defaultBranch [[branchName]]
- Check git config file
git config --list
- To download repo changes use
git pull origin
for all branches changes - Then
git checkout
to merge the changes - If you want to download and merge in one: use
git pull --all
- Configure bundler for project in Terminal:
bundle config set path vendor/bundle
Mine: bundle config set path /home/emma.gardecki/.local/share/gem/ruby/3.1.0/bin
Should create a file /.bundle/config with the BUNDLE_PATH - Use
gem install --user-install [[gem_name]]
List of gems:
i. bundle
ii. bundler
iii. commonmarker
iv. gemoji
v. github-pages
vi. jekyll
vii. kramdown
viii. listen
ix. nokogiri
x. racc
xi. rake
xii. rougify
xiii. sass
xiv. sass-convert
xv. scss - Update gems
gem update
- Update bundle
bundle update
-> this could make changes to Gemfile and Gemfile.Lock
- If changes to any gems or config,
bundle update
- To locally deploy,
bundle exec jekyll serve
GitHub issue: Detatched Head State Fix
- The easier way to commit is using the Source Control icon on the right toolbar in VSCode, write message, stage commits and push all right there
- If you want to download and merge in one: use
git pull --all
- To commit changes
git commit -m
for short message changes
To make long message commitgit commit
which will open Vim interface for commit message - To push changes
git push origin [[branchname]]
- To check connection
git fsck
- To switch between branches
git switch [[branchname]]
- To remove remote connection,
git remote rm [[branchname]]
- Add file to commit,
git add [file path]
- Check what commits are staged,
git status
- If you want to download and merge in one: use
git pull --all
- Make new branch,
git checkout -b [branchName]
- Make commit,
git commit -m "[message]"
- Connect newBranch to server,
git push origin -u [branchName]
(only need to do this with first commit of a new branch)
- Information at the bottom of each page is found in this file
- _includes/footer.html