Last active
August 29, 2015 14:04
-
-
Save jasperf/8286c69c30d830b87abe to your computer and use it in GitHub Desktop.
Useful Git commands for everyday management Repo #git
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
adduser --home /var/www <your_user> | |
su - <new_user> | |
//add user to webserver group Debian Ubuntu | |
useradd -G www-data username | |
ssh-keygen | |
cat .ssh/id_rsa.pub | |
//and add this content on BB | |
//https://gist.github.com/oodavid/1809044 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//add and commit all | |
git commit -am "commit message" | |
//OR | |
git add -A && git commit -m "fixed duplicates" | |
//check status repo to see if any changes were made or files were added. | |
git status | |
// Check all commits by date | |
git reflog --date=iso | |
//Compare two commits by reference id number (pick most recent one) to see what files have changed. | |
git diff-tree --no-commit-id --name-only -r number | |
//then see changes in one file compared to its state in previous commit | |
git diff HEAD^ HEAD /path/to/file |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment