Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> Brak zmian w repozytorium
Matrix12
post 15.09.2015, 21:19:35
Post #1





Grupa: Zarejestrowani
Postów: 144
Pomógł: 0
Dołączył: 22.03.2015

Ostrzeżenie: (0%)
-----


Zrobiłem sobie zwykłe repo na serwerze.., zrobilem clone w drugim katalogu do tego reposytorium. Na localhost dałem clona i dałem zmianę i wysłałem na serwer. Problem w tym że git log widzi tego komita git show widzi zmiane ale w pliku nie widac tej zmiany. Nie da się zrobić git pull bo nie ma skąd go wziąć. Jak do tego podejść? Jak zrobić by były te zmiany widoczne?
Go to the top of the page
+Quote Post
Pyton_000
post 16.09.2015, 07:17:52
Post #2





Grupa: Zarejestrowani
Postów: 8 068
Pomógł: 1414
Dołączył: 26.10.2005

Ostrzeżenie: (0%)
-----


Musisz utworzyć repozytorium --bare.
Te które będzie Twoim centralnym repozytorium

Ten post edytował Pyton_000 16.09.2015, 07:18:12
Go to the top of the page
+Quote Post
Matrix12
post 16.09.2015, 11:27:06
Post #3





Grupa: Zarejestrowani
Postów: 144
Pomógł: 0
Dołączył: 22.03.2015

Ostrzeżenie: (0%)
-----


Czyli przykładowo : mam katalog gitrep(taka moja dewerloperka) potem w innym katalogu mam przykładowo projects. W gitrep(tam gdzie mam kod) daje git init --bare, w katalogu projects robie git clone, a na localhost też robie git clone i to wystarczy tak?
Go to the top of the page
+Quote Post
Pyton_000
post 16.09.2015, 12:10:25
Post #4





Grupa: Zarejestrowani
Postów: 8 068
Pomógł: 1414
Dołączył: 26.10.2005

Ostrzeżenie: (0%)
-----


tak, potem wystarczy push i pull na innych repo
Go to the top of the page
+Quote Post
Matrix12
post 16.09.2015, 14:53:01
Post #5





Grupa: Zarejestrowani
Postów: 144
Pomógł: 0
Dołączył: 22.03.2015

Ostrzeżenie: (0%)
-----


Zrobiłem tak i tam gdzie mam kod i git init --bare chciałem zrobić git add -A i mam fatal: This operation must be run in a work tree
Go to the top of the page
+Quote Post
Pyton_000
post 16.09.2015, 18:12:14
Post #6





Grupa: Zarejestrowani
Postów: 8 068
Pomógł: 1414
Dołączył: 26.10.2005

Ostrzeżenie: (0%)
-----


Chyba nie bardzo rozumiesz idee GIT
Do --bare nie możesz commitować.
--bare jest repozytorium centralnym do którego wypucha się zimany (git push), pobiera (pull) i klonuje zeń (git clone)
Go to the top of the page
+Quote Post
Matrix12
post 16.09.2015, 18:50:12
Post #7





Grupa: Zarejestrowani
Postów: 144
Pomógł: 0
Dołączył: 22.03.2015

Ostrzeżenie: (0%)
-----


Więc gdzie ja mam trzymać projekt ? Chodzi mi o główne repozytorium ?


To ma być tak :


//katalog gitrep

git init --bare



//katalog projetcts(w nim trzymam kod )

git clone /home/gitrep



w na localhost robie

git clone ssh://root@111.11.11.11/home/gitrep




potem robie zmiany git push


wchodże do katalogu projects i tam robie git pull


tak to wygląda?
Go to the top of the page
+Quote Post
Pyton_000
post 16.09.2015, 18:54:38
Post #8





Grupa: Zarejestrowani
Postów: 8 068
Pomógł: 1414
Dołączył: 26.10.2005

Ostrzeżenie: (0%)
-----


Tak dokłanie
Go to the top of the page
+Quote Post
Matrix12
post 16.09.2015, 19:30:48
Post #9





Grupa: Zarejestrowani
Postów: 144
Pomógł: 0
Dołączył: 22.03.2015

Ostrzeżenie: (0%)
-----


nie do końca to działa. Wrzuciłem pliki do katalogu projects zrobiłem git add -A git commit i potem na localhost zrobilem git clone ssh://ip/home/gitrep/project i ściągnął mi puste repo
Go to the top of the page
+Quote Post
Pyton_000
post 16.09.2015, 19:44:49
Post #10





Grupa: Zarejestrowani
Postów: 8 068
Pomógł: 1414
Dołączył: 26.10.2005

Ostrzeżenie: (0%)
-----


a push zrobił>
Go to the top of the page
+Quote Post
Matrix12
post 17.09.2015, 12:02:07
Post #11





Grupa: Zarejestrowani
Postów: 144
Pomógł: 0
Dołączył: 22.03.2015

Ostrzeżenie: (0%)
-----


Tak próbowałem ale miałem błąd coś takieg



warning: push.default is unset; its implicit value is changing in
Git 2.0 from 'matching' to 'simple'. To squelch this message
and maintain the current behavior after the default changes, use:

git config --global push.default matching

To squelch this message and adopt the new behavior now, use:

git config --global push.default simple

When push.default is set to 'matching', git will push local branches
to the remote branches that already exist with the same name.

In Git 2.0, Git will default to the more conservative 'simple'
behavior, which only pushes the current branch to the corresponding
remote branch that 'git pull' uses to update the current branch.

See 'git help config' and search for 'push.default' for further information.
(the 'simple' mode was introduced in Git 1.7.11. Use the similar mode
'current' instead of 'simple' if you sometimes use older versions of Git)

No refs in common and none specified; doing nothing.
Perhaps you should specify a branch such as 'master'.
fatal: The remote end hung up unexpectedly


Ten post edytował Matrix12 17.09.2015, 18:00:45
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Wersja Lo-Fi Aktualny czas: 29.03.2024 - 13:54