How to check the current user and repo config
shravan-shravan-kuchkula.github.io$git config --list credential.helper=osxkeychain user.name=shravan-kuchkula email@example.com core.repositoryformatversion=0 core.filemode=true core.bare=false core.logallrefupdates=true core.ignorecase=true core.precomposeunicode=true remote.origin.url=https://github.com/shravan-kuchkula/shravan-kuchkula.github.io.git remote.origin.fetch=+refs/heads/*:refs/remotes/origin/* branch.master.remote=origin branch.master.merge=refs/heads/master shravan-shravan-kuchkula.github.io$
How to force git to prompt for passwd on mac?
Run the following and hit enter.
$ git credential-osxkeychain erase host=github.com protocol=https
Next time when you run a
git push, you will be prompted for username and passwd.
Shravan: skuchkula.github.io$ git push -u origin master Username for 'https://github.com': skuchkula Password for 'https://firstname.lastname@example.org': Counting objects: 6, done. Delta compression using up to 4 threads. Compressing objects: 100% (4/4), done. Writing objects: 100% (6/6), 539 bytes | 0 bytes/s, done. Total 6 (delta 1), reused 0 (delta 0) remote: Resolving deltas: 100% (1/1), done. To https://github.com/skuchkula/skuchkula.github.io.git 5600929..eec0d5c master -> master Branch master set up to track remote branch master from origin.
Additional git tips
This link is all you need: learn git concepts not commands
Vim and repeat keys
# Mac OS X Lion introduced a new, iOS-like context menu when you press and hold a key # that enables you to choose a character from a menu of options. If you are on Lion # try it by pressing and holding down 'e' in any app that uses the default NSTextField # for input. # # It's a nice feature and continues the blending of Mac OS X and iOS features. However, # it's a nightmare to deal with in Sublime Text if you're running Vintage (Vim) mode, # as it means you cannot press and hold h/j/k/l to move through your file. You have # to repeatedly press the keys to navigate. # You can disable this feature for just Sublime Text by issuing the following command # in your terminal (*not* the Sublime Text console): defaults write com.sublimetext.3 ApplePressAndHoldEnabled -bool false # Note: replace com.sublimetext.3 with whichever version of Sublime Text you are running # eg. 'com.sublimetext.2' # Alternately, if you want this feature disabled globally, you can enter this: defaults write -g ApplePressAndHoldEnabled -bool false # In either case you'll need to restart Sublime Text for the change to take place.