Git

Collaborative Workflow

I suggest we following this workflow for the project. Basically, you need to:

  • Fork the repo
  • Clone to your own server
  • Do what ever you want in your forked repo, like add, commit, push without worry about the conflict issues
  • Send pull request to the master repo RILAB/GBSMethylation when you want to share your progress
  • If no conflict, we can just merge it. Otherwise, some body have to fix the conflicts
  • Do not forget to merge from the updated RILAB master repo to your own fork
  • Suggestion welcomed

Commonly used practices

How to delete a Git branch both locally and remotely

Delete local branch

git branch -D bugfix
# Deleted branch bugfix

Delete remote branch

git push origin --delete bugfix

Restore deleted files

To restore all those deleted files in a folder enter the following command.

git ls-files -d | xargs git checkout --

Git diff

git diff color-words fjdfjl:file.txt fjdlafj:file.txt

results matching ""

    No results matching ""