Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- git cheat sheet
- ##
- ## Git setup - name and email file
- ##
- # Set up name and email
- # Pair programming
- # Add this file to home directory (changing name, initials and emails):
- .pairs
- pairs:
- al: Ada Lovelace
- edlf: Enrique de la Fuente
- email:
- al: adanator@me.com
- edlf: queenrique@gmail.com
- #Solo setup
- $ git config --global user.name "Umitosan"
- $ git config --global user.email yeahdom@gmail.com
- ##
- ## list of commands used
- ##
- $ git init # Initializes a local REPO at current working dir - adds files inside a hidden folder called .git
- $ git add [filename] # adds the file and any changes made to the file to the commit
- $ git add . # adds ALL files recursivly that aren't already added
- $ git remote add [user nickname] [URL] # links local repo to remote repo
- $ git commit -m "commit message" # commits previously added changes AND attaches a message to the commit
- $ git remote -v # displays remotes - nicknames and urls
- $ git push [user nickname] [branch] # pushes all local commits to remote repo and specific branch (master, etc)
- $ git clone [remote url] # copies the remote repo to the current dir
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement