-
Notifications
You must be signed in to change notification settings - Fork 0
Git
-
To list remote branches:
git branch -r
-
You can check them out as local branches with:
git checkout -b LocalName origin/remotebranchname
-
Download a local branch and make a new branch from that
git checkout -b newlocalbranchname origin/branch-name
-
Git pull
- In the simplest terms, git pull does a git fetch followed by a git merge.
- You can do a git fetch at any time to update your remote-tracking branches under refs/remotes//.
- This operation never changes any of your own local branches under refs/heads, and is safe to do without changing your working copy. I have even heard of people running git fetch periodically in a cron job in the background (although I wouldn't recommend doing this). A git pull is what you would do to bring a local branch up-to-date with its remote version, while also updating your other remote-tracking branches.
-
Create and manage branches
https://github.com/Kunena/Kunena-Forum/wiki/Create-a-new-branch-with-git-and-manage-branches
delete a branch
https://makandracards.com/makandra/621-git-delete-a-branch-local-or-remote -
Install git on local machine http://joemaller.com/908/how-to-install-git-on-a-shared-host/
-
Git pull/push: git pull https://github.com/vanhoan310/scRNAseq_clustering_benchmark
git push https://github.com/vanhoan310/scRNAseq_clustering_benchmark.git -
Git reset to some commit
https://stackoverflow.com/questions/4114095/how-to-revert-a-git-repository-to-a-previous-commit -
Big file error (DON'T REMOVE FILE) https://stackoverflow.com/questions/19573031/cant-push-to-github-because-of-large-file-which-i-already-deleted
git filter-branch --index-filter 'git rm -r --cached --ignore-unmatch landmark_based_sc/octave-workspace ' HEAD
-
Ignore a directory/ files https://stackoverflow.com/questions/343646/ignoring-directories-in-git-repos-on-windows
-
Remove and change REPO: https://stackoverflow.com/questions/1221840/remote-origin-already-exists-on-git-push-to-a-new-repository
-
Change repo (when download another github) https://stackoverflow.com/questions/2432764/how-to-change-the-uri-url-for-a-remote-git-repository
git push -u origin master
-
We can create public key on server as normal. https://stackoverflow.com/questions/8588768/how-do-i-avoid-the-specification-of-the-username-and-password-at-every-git-push
-
Fix the password prompt by switching from HTTPs to SSH: https://stackoverflow.com/questions/6565357/git-push-requires-username-and-password