I have already a project on GitLab
which I've been working on, and recently I've been assigned another project on bitbucket
.
I already understand that when I work on a project and I need to push
, pull
, add
, commit
etc. then I need to ensure I'm already in that project's directory, but what other factors do I need to be aware of? I'd like to avoid any conflicts or embarrassing situations like committing code to the wrong project, so perhaps I need to switch between different repos.
A while back a former colleague configured in my .bash_profile
file. The below commands were for a project I no longer work on, so I don'T use this anymore but it's still there in my .bash_profile
file:
set_companyX_git(){
git config --global http.sslcertpasswordprotected true
git config --global http.sslCert /Users/my_mbp/Software/ssl_project/keystore.p12
}
unset_companyX_git(){
git config --unset --global http.sslcertpasswordprotected
git config --unset --global http.sslCert
}
I'd like to add something similar in my .bash_profile
again, but I'm not sure how correct these commands are. Hopefully a git pro can put me on the right path here.
Due to my existing project on Gitlab I'll already have a ssh key, but must this key be individual to every repo, or to every Repository Management Services, or does it not matter so long as I have a key?