Knowledge Base

¿Qué es esto?

git: Cambiar usuario y pwd con el que nos conectamos a un repositorio ya creado con SourceTree

25/01/2016 - 27/12/2018 -  Comentarios - git Clientes Sourcetree

Podemos hacerlo modificando el fichero .git/config

Allí está guardada la URL del repositorio con el nombre de usuario y todo, se cambia reiniciamos el sourcetree y ya está:

[remote "origin"]

url = https://nombreUsuario@domain.com/path/to/git/repo.git

fetch = +refs/heads/*:refs/remotes/origin/*

pushurl = https://nombreUsuario@domain.com/path/to/git/repo.git