Last active
February 27, 2017 22:43
-
-
Save safizn/92e56aed49dcb0f1eae707a27f001eb0 to your computer and use it in GitHub Desktop.
This file contains 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
echo "# webapp-radioscanner" >> README.md | |
git init | |
git add README.md | |
git commit -m "first commit" | |
git remote add origin https://github.com/myuseringithub/webapp-radioscanner.git | |
git push -u origin master | |
# keep forked repo up to date | |
https://gist.github.com/CristinaSolana/1885435 |
This file contains 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
# add twice `.git` at the end with space between them. | |
git clone --bare https://github.com/<username>/<repo>.git .git | |
# make it into a regular github project | |
git config --bool core.bare false | |
# Reset head pointer on git so that the project is on its last state. | |
git reset --hard | |
# show all brances: | |
git branch | |
# change branch: | |
git checkout <branch> | |
# Ignore newly added files locally, allowing to return to them later. | |
git stash |
This file contains 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
curl -o docker-compose-proxy.yml https://raw.githubusercontent.com/vfarcic/docker-flow-proxy/master/docker-compose.yml |
This file contains 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
# Add git submodule | |
git submodule add https://github.com/<user>/<repo> <foldername> | |
# Or | |
# Initialize submodule | |
git clone --branch <version> git://github.com/<urlPath> <directory> | |
# Update submodules automatically - there is no option like that, but it can follow a branch and make git checkout update it easily. | |
git submodule update --remote --recursive | |
git add appDeploymentLifecycle | |
git commit -m "Updated appDeploymentLifecycle" | |
git push | |
#automatically update submodules - Maybe considered OLD way | |
#http://stackoverflow.com/questions/4611512/is-there-a-way-to-make-git-pull-automatically-update-submodules | |
git config --global alias.pullall '!f(){ git pull "$@" && git submodule update --init --recursive; }; f' | |
# OR other way of updating: | |
git submodule foreach git pull origin master | |
# For specific branch | |
git submodule foreach git pull origin <version>-branch | |
git submodule update --init --recursive |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment