-
Notifications
You must be signed in to change notification settings - Fork 0
/
create_repository_github.txt
86 lines (58 loc) · 2.59 KB
/
create_repository_github.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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
Create repository github
repository para colocar todos os files criados
website
create a new repository
Turtles_Data_Analysis_Storage
without readme
https://github.com/Juunicacio/Turtles_Data_Analysis_Storage.git
create a new repository on the command line
echo "# Turtles_Data_Analysis_Storage" >> README.md
git init
git add README.md
git commit -m "1st commit"
git branch -M main
git remote add origin https://github.com/Juunicacio/Turtles_Data_Analysis_Storage.git
git push -u origin main
DEU CERTO
para voltar nesse repository vindo do segundo:
git remote set-url origin https://github.com/Juunicacio/Turtles_Data_Analysis_Storage.git
para controlar em qual repository eu estou:
git remote -v update
____________________________________________________
repository para colocar os mais importantes. para usar como referencia no trabalho
website
create a new repository
Turtles_Reference_dataset_files
without readme
https://github.com/Juunicacio/Turtles_Reference_dataset_files.git
echo "# Turtles_Reference_dataset_files" >> README.md
git init
git add README.md
git commit -m "first commit"
git branch -M main
git remote add origin https://github.com/Juunicacio/Turtles_Reference_dataset_files.git
git push -u origin main
fatal: remote origin already exists.
origin ja tem, tenho q:
git remote set-url origin https://github.com/Juunicacio/Turtles_Reference_dataset_files.git
then
git push -u origin main
deu certo, mas me salvou todos os files da cartela, nao so Readme.md e outro q eu tinha add.
But if you want to remove the file only from the Git repository and not remove it from the filesystem, use:
git rm --cached <file1>.txt
git commit -m "remove file1.txt"
And to push changes to remote repo
git push -u origin main
nao funcionou muito bem, pq removi, mas removi do primeiro repository, como eu fiz o push no segundo, nao me retirou
complatamente do primeiro repository, mas se eu fizesse push no primeiro, me tiraria de la.
acabei eliminando file por file q nao me serviva diretamente do site.
quando eu fiz
git remote -v update
https://jigarius.com/blog/multiple-git-remote-repositories
Two Minute Version
Define a git remote which will point to multiple git remotes.
Say, we call it “all”: git remote add all REMOTE-URL-1.
Register 1st push URL: git remote set-url --add --push all REMOTE-URL-1.
Register 2nd push URL: git remote set-url --add --push all REMOTE-URL-2.
Push a branch to all the remotes with git push all BRANCH – replace BRANCH with a real branch name.
You cannot pull from multiple remotes, but you can fetch updates from multiple remotes with git fetch --all.