Salut les gars, je suis un débutant à git mais nous essayons de l'utiliser au bureau pour suivre les changements de grands projets Web.GitHub - Shared Network Drive Repo
Nous avons les fichiers de site Web pour un grand site sur un lecteur réseau partagé, voici mon processus actuel et les problèmes auxquels je suis confronté!
Je suis sur Windows 10 et j'utilise l'interface de ligne de commande git.
I cd dans ce répertoire de site sur notre lecteur partagé et procédez comme suit:
$ cd /x/Clients/ClientA/Website/
$ git init
$ git status
$ git add --all
$ git commit -m "Initial Commit"
je puis cd sur mon bureau et cloner une version locale:
$ cd /c/Users/Account/Desktop/
$ git clone /x/Clients/ClientA/Website/
Ce clones parfaitement, je Maintenant, changez un fichier en utilisant Atom dans mon bureau/site Web/dossier et enregistrez-le.
J'engage alors ces changements et essayer de les repousser à mon lecteur partagé:
$ git status
On branch master
Your branch is up-to-date with 'origin/master'.
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: index.html
no changes added to commit (use "git add" and/or "git commit -a")
$ git add --all
$ git commit -m "Edited file"
[master 76782c6] Edited file
1 file changed, 3 insertions(+)
$ git push
Counting objects: 11, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (10/10), done.
Writing objects: 100% (11/11), 922 bytes | 0 bytes/s, done.
Total 11 (delta 6), reused 0 (delta 0)
remote: Checking connectivity: 11, done.
remote: error: refusing to update checked out branch: refs/heads/master
remote: error: By default, updating the current branch in a non-bare repository
remote: is denied, because it will make the index and work tree inconsistent
remote: with what you pushed, and will require 'git reset --hard' to match
remote: the work tree to HEAD.
remote:
remote: You can set the 'receive.denyCurrentBranch' configuration variable
remote: to 'ignore' or 'warn' in the remote repository to allow pushing into
remote: its current branch; however, this is not recommended unless you
remote: arranged to update its work tree to match what you pushed in some
remote: other way.
remote:
remote: To squelch this message and still keep the default behaviour, set
remote: 'receive.denyCurrentBranch' configuration variable to 'refuse'.
To X:/Clients/ClientA/Website/
! [remote rejected] master -> master (branch is currently checked out)
error: failed to push some refs to 'X:/Clients/ClientA/Website/'
Quelqu'un peut-il me diriger dans la bonne direction sur la façon dont je peux l'obtenir mis en place afin que plusieurs personnes dans le bureau peut cloner et pousser à cet endroit sur le lecteur réseau avec succès?
Merci!
Affectation de lecture: [4.1 Git sur le serveur - Les protocoles] (https://git-scm.com/book/en/v2/Git-on-the-Server-The-Protocols) – crashmstr
Merci pour le lien Je vais certainement le lire! – KiwisTasteGood