Github (SSH) via public WIFI, port 22 blocked
Try this: $ vim ~/.ssh/config Add Host github.com Hostname ssh.github.com Port 443 Source: https://help.github.com/articles/using-ssh-over-the-https-port
Try this: $ vim ~/.ssh/config Add Host github.com Hostname ssh.github.com Port 443 Source: https://help.github.com/articles/using-ssh-over-the-https-port
What will happen if I use git pull –rebase ? git pull –rebase is roughly equivalent to git fetch git rebase origin/master i.e. your remote changes (C) will be applied before the local changes (D), resulting in the following tree A — B — C — D What will happen if I use git pull … Read more
1. Add a remote alias for your local repository, ex: git remote add self file:///path/to/your/repository (Or on windows git remote add self C:\path\to\your\repository) 2. Push to the self remote, ex: git push self dev:master
Find out how to fix this here: https://github.com/blog/1614-two-factor-authentication#how-does-it-work-for-command-line-git How does it work for command-line Git? If you are using SSH for Git authentication, rest easy: you don’t need to do anything. If you are using HTTPS Git, instead of entering your password, enter a personal access token. These can be created by going to your … Read more
Short answer You omitted the fact that you ran git push, got the following error, and then proceeded to run git pull: To git@bitbucket.org:username/test1.git ! [rejected] dev -> dev (non-fast-forward) error: failed to push some refs to ‘git@bitbucket.org:username/test1.git’ hint: Updates were rejected because the tip of your current branch is behind hint: its remote counterpart. … Read more
What you want is a diff with 0 lines of context. You can generate this with: git diff –unified=0 or git diff -U0 You can also set this as a config option for that repository: git config diff.context 0 To have it set globally, for any repository: git config –global diff.context 0
Standard Subversion layout Create a git clone of that includes your Subversion trunk, tags, and branches with git svn clone http://svn.example.com/project -T trunk -b branches -t tags The –stdlayout option is a nice shortcut if your Subversion repository uses the typical structure: git svn clone http://svn.example.com/project –stdlayout Make your git repository ignore everything the subversion … Read more
With with Git 2.11 (Q4 2016) and after, you can do: git config diff.wsErrorHighlight all See doc on git diff and on git config. For versions older than that, you can set the color.diff.whitespace config setting, e.g. with: git config color.diff.whitespace “red reverse” (I’m assuming that you already have color.diff or color.ui set to auto … Read more
It seems safe and should not overwrite anything important. From the git docs: Running git init in an existing repository is safe. It will not overwrite things that are already there. The primary reason for rerunning git init is to pick up newly added templates.
You can revert the commit without creating a new one by adding the –no-commit option. This leaves all the reverted files in the staging area. From there, I’d perform a mixed reset (the default for reset) to un-stage the files, and add in the changes I really wanted. Then, commit, (you can add and commit … Read more