-
-
Save juankiz123/9412196 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Get the project | |
git clone [email protected]:username/repositoryname.git | |
//Make changes to the project | |
//Problem! You made changes to the project beeing on master branch, how do you save those changes to a new branch? | |
//Save a stack | |
git stash | |
//Check actual file mode | |
git config core.fileMode | |
//Set file Mode to false if file mode is true | |
git config core.fileMode false | |
//fetch develop branch, make the branch appears | |
git branch --track develop origin/develop | |
develop | |
*master | |
//change to the branch develop | |
git checkout develop | |
*develop | |
master | |
//change to a new branch 'cambio' | |
git checkout -b cambio | |
*cambio | |
develop | |
master | |
//recover the changes we save on the stack to the branch cambio | |
git stash pop | |
//prepare to commit | |
git add -A | |
git commit -m "we add constants" | |
//Check the state of fileMode, should be false | |
git config core.fileMode | |
false | |
//Push our branch cambio | |
git push origin cambio | |
//The next step is go to github.com and Create Pull Request | |
//Edit and select develop>cambio | |
//Send Pull Request | |
//Merge Pull Request | |
//END |
//Para limpiar archivos inutiles, generados al momento de hacer merge con archivos en conflicto
git clean -f
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
//Para borrar un branch
git branch -D "nombre del branch"