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
Самый основной метод: | |
1. Форкаете репозиторий github.com/user1/project, получаете github.com/you/project | |
2. Уже форкнутый репозиторий сливаете себе на комп: | |
git clone git@github.com:/you/project project | |
3. Создаёте отсылку на «родительский» репозитарий, например как на upstream | |
git remote add git@github.com:/user1/project upstream, чтобы потом сливать изменения с «родителя» себе git pull | |
http://habrahabr.ru/post/125799/#comment_4147240 | |
upstream master | |
4. Создаёте новую ветку |
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
http://blog.jayfields.com/2008/02/using-patch-as-subversion-stash.html | |
to make a stash: | |
1) add all new files | |
2) create a patch: | |
svn diff > patch_name.patch | |
3) revert all changes | |
svn revert -R . | |
to unstash apply a patch: |
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
#!/bin/sh | |
for BRANCH in br1 br2 | |
do | |
git checkout $BRANCH | |
git cherry-pick master | |
git push origin $BRANCH | |
done |
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
git clone https://username:'password'@github.com/username/repo.git |
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
#!/usr/bin/expect | |
spawn svn up | |
expect { | |
"username@svn.domain.com's password:*" { | |
send -- "password\r" | |
exp_continue | |
} | |
eof { | |
exit 0} |
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
#!/bin/bash | |
for PROJECT in Proj1 Proj2 | |
do | |
echo "##############" | |
echo "Starting ${PROJECT} update..." | |
cd /home/username/httpdocs/services/projects/${PROJECT} | |
expect <<- DONE | |
spawn svn up | |
expect { |
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
git diff --no-prefix > patchfile | |
then apply the patch: | |
patch -p0 < patchfile | |
If you have an existing "git diff" patch file that was created without the "--no-prefix" option, you can apply that patch via: | |
patch -p1 < patchfile | |
this will ignore the default a/ b/ source prefixes. |
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
#!/bin/bash | |
find . -type f -printf '%p\n' | while read file; do | |
oldfile=$(basename "$file") | |
newfile=$(echo "$oldfile" | sed 's/OLDNAME.jpg/NEWNAME.jpg/g') | |
if [ ! "$newfile" == "$oldfile" ]; then | |
mv "$file" "${file%$oldfile}$newfile" | |
fi | |
done |
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
#!/bin/bash | |
# list all branches | |
git for-each-ref --format='%(refname:short)' refs/heads | | |
while read branch; do | |
# if [[ $branch == ru_template32 ]]; then | |
# exit 0 | |
# fi | |
echo $branch | |
git checkout $branch |
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
#! /bin/bash | |
# path to project dir | |
base_path=/home/username/apps/android_template/ | |
# path to main app project | |
proj_path=${base_path}MainActivity/ | |
# path to res dir | |
res_path=${proj_path}res/ | |
# path to dir with images for all necessary branches | |
img_path=/home/username/apps/images/ |
OlderNewer