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 a remote | |
git remote add [name] [location] | |
# Show details of remote | |
git remote show [name] | |
# Show a list of the known remotes | |
git remote | |
# Show the details of all known remotes | |
git remote -v |
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
# git push [target] | |
# The following are equivalent | |
git push | |
git push origin | |
# git pull [source] | |
# The following are equivalent | |
git pull | |
git pull origin |
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
# Remove already committed file | |
git rm -r --cached [filename] |
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
# Ignore .settings folder of Eclipse | |
.settings/ | |
# Ignore .project file of Eclipse | |
.project | |
# Ignore Mavens target folder | |
target/ |
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
# Use the simple strategy as push default | |
git config push.default simple |
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
git push | |
# warning: push.default is unset; its implicit value is changing in | |
# Git 2.0 from 'matching' to 'simple'. To squelch this message | |
# and maintain the current behavior after the default changes, use: | |
# | |
# git config --global push.default matching | |
# | |
# To squelch this message and adopt the new behavior now, use: | |
# |
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
# The default cache timeout is 15 minutes | |
git config credential.helper cache | |
# With --timeout the cache timeout is configured to one hour | |
git config credential.helper "cache --timeout=3600" |
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
# Configure username | |
git config user.name "Your Name" | |
# Configure email address | |
git config user.email "[email protected]" |
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
# Remove repository configuration | |
git config --unset [key] | |
# Remove global configuration | |
git config --global --unset [key] | |
# Remove system configuration | |
git config --system --unset [key] |
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 repository configuration | |
git config [key] [value] | |
# Add global configuration | |
git config --global [key] [value] | |
# Add system configuration | |
git config --system [key] [value] | |
# Show repository configuration for key | |
git config [key] | |
# Show global configuration for key |
NewerOlder