-
Notifications
You must be signed in to change notification settings - Fork 0
/
GIT Notes.txt
70 lines (38 loc) · 1.91 KB
/
GIT Notes.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
GIT Instructions
================
git add .
git commit -m "Changes Notes"
git push everyone master --force
https://stackoverflow.com/questions/5509543/how-do-i-properly-force-a-git-push
ref: https://stackoverflow.com/questions/13382415/mirroring-a-repository-across-github-sourceforge-and-google-code
You can edit your .git/config file to create a remote that pushes to multiple repositories.
[remote "everyone"]
url = https://github.com/USERNAME/REPOSITORY.git
url = ssh://USERNAME@git.code.sf.net/p/PROJECTNAME/MOUNTPOINT
url = https://PROJECT.googlecode.com/git
or with the git config --add command:
git config --add remote.everyone.url https://github.com/USERNAME/REPOSITORY.git
git config --add remote.everyone.url ssh://USERNAME@git.code.sf.net/p/PROJECTNAME/MOUNTPOINT
git config --add remote.everyone.url https://PROJECT.googlecode.com/git
Now when you type git push everyone master, you'll push the master branch to all three remotes.
git push everyone master --force
git push --all --force <== If any issues with above !
Thanks to this Stack Overflow answer for the clue.
https://linuxways.net/ubuntu/how-to-setup-git-server-on-ubuntu-20-04/
Ref below: https://stackoverflow.com/questions/3899627/create-git-branch-with-current-changes
git branch 3.4.0
git checkout 3.4.0
git commit -s
git add .
git commit -m "3.4.0.1"
git push --set-upstream origin 3.4.0.1
git config --add remote.everyone.url https://github.com/hamlibdk/HAMLIB-SDK.git
git config --add remote.everyone.url https://hamlibdk@git.code.sf.net/p/hamlib-sdk/code
Pushing Tags..
--------------
See: https://git-scm.com/book/en/v2/Git-Basics-Tagging
See: https://stackoverflow.com/questions/7328454/how-to-synchronize-multiple-git-repositories-including-tags-and-branches
--> Especially: for i in $(git remote); do git push --mirror "$i"; done
git tag -a v3.4.0.1 -m "v3.4.0-U1"
then
for i in $(git remote); do git push --mirror "$i"; done