git:start

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
git:start [2021/03/03 11:00] – created jmerarigit:start [2021/10/19 08:54] (current) – jmerari
Line 8: Line 8:
 git pull http://bitbucket.org/etcetc master --allow-unrelated-histories git pull http://bitbucket.org/etcetc master --allow-unrelated-histories
 </code> </code>
 +
 +===== Resolving Conflict =====
 +Provided that you already setup the merge tool to your favorite software (Kdiff3 or others) :
 +<code>
 +git mergetool
 +</code>
 +
 +===== Using Git with SSH Connection =====
 +==== Why use SSH ? ====
 +Compare to HTTPS, using SSH is more secure. You never send your username and password accros the network. For a private repository, SSH is much preferred.
 +
 +==== Step by Step ====
 +1. Create key pair for your account. Put your email as Comment (CLI option -C) on this key. If you use the same email for Bitbucket, Github, and Gitlab, you can use the same key for all of them. Using different key is more secure. If one key compromised, the other key is still secure. For refreshment about SSH, see [[:ssh|OpenSSH]]
 +<code>
 +ssh-keygen -t ed25519 -C "jim.merari@gmail.com"
 +</code>
 +2. Go to your account setting menu in bitbucket.org/github.com/gitlab.com. Find the page related to SSH/GPG. The page will list all the keys that have been associated with your account. Copy the content of your newly generated public key to the corresponding setting form. See more detail on each respective website ([[https://support.atlassian.com/bitbucket-cloud/docs/set-up-an-ssh-key/|Bitbucket]], [[https://docs.github.com/en/authentication/connecting-to-github-with-ssh/about-ssh|Gitbub]]).
 +
 +After the new key listed, then you can push/fetch with the command :
 +<code>
 +git push ssh://git@github.com:jmerari/some-repo.git
 +git push ssh://git@bitbucket.org:jmerari/some-repo.git
 +</code>
 +
 +https://blog.developer.atlassian.com/different-ssh-keys-multiple-bitbucket-accounts/
  
  • git/start.1614744028.txt.gz
  • Last modified: 2021/03/03 11:00
  • by jmerari