How to connect and push project to gitserver
I'm newer on using git.
My boss gave me a link git-server like that: //Dev/.../ios_project.git
and asked me to push my project on it (not push on GitHub, but company server).
After reading the documentation on git-scm.com I'm still confused and have no idea how to do this.
git
add a comment |
I'm newer on using git.
My boss gave me a link git-server like that: //Dev/.../ios_project.git
and asked me to push my project on it (not push on GitHub, but company server).
After reading the documentation on git-scm.com I'm still confused and have no idea how to do this.
git
add a comment |
I'm newer on using git.
My boss gave me a link git-server like that: //Dev/.../ios_project.git
and asked me to push my project on it (not push on GitHub, but company server).
After reading the documentation on git-scm.com I'm still confused and have no idea how to do this.
git
I'm newer on using git.
My boss gave me a link git-server like that: //Dev/.../ios_project.git
and asked me to push my project on it (not push on GitHub, but company server).
After reading the documentation on git-scm.com I'm still confused and have no idea how to do this.
git
git
edited Nov 19 '18 at 12:17
phd
21.1k52442
21.1k52442
asked Nov 19 '18 at 7:30
Hoan NguyễnHoan Nguyễn
114
114
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
In order to push
code to your git server you need to do the following:
- Add your files which you wish to upload to your server
- commit the changes (with a commit message)
- Add the remote server url
- push the code (upload) to your server
# Track your local changes
git status
# Add the desired files (Choose the suitable one for you)
git add <file name> <file name> <file name>
# Add all files in a given folder
git add <folder name>
# Add all files
git add .
# Add the remote
git remote add origin <url>
# "upload" your files to your server
git push origin <branch name>
add a comment |
Note: //Dev/.../ios_project.git
that link will work only if your working repo is placed on same machine with bare (your Dev repo) or if you will mount it directory to your local machine. Else link to repo must start with protocol@ip:
like 'git@xx.xx.xx.xx:/dev/typesetting.git` and if you public key is writen in .ssh/authorized_keys on remote host your pushes will be accepted, else you will must to enter the password.
1) You need to add repository that your boss give you like a remote repository:
git remote add <choose the name of host like prod or dev> //Dev/.../ios_project.git
2) You need to add files that you want to push (or just commit) to stage
git add <file1> <file2>
// or to add all changed and new files
git add .
3) To fix phase of your work
git commit -m 'litle explanation of current changes'
4) after all just push it
git push <name of remote host that you set earlier> <branch to push (like dev for egx.)>
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53370099%2fhow-to-connect-and-push-project-to-gitserver%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
In order to push
code to your git server you need to do the following:
- Add your files which you wish to upload to your server
- commit the changes (with a commit message)
- Add the remote server url
- push the code (upload) to your server
# Track your local changes
git status
# Add the desired files (Choose the suitable one for you)
git add <file name> <file name> <file name>
# Add all files in a given folder
git add <folder name>
# Add all files
git add .
# Add the remote
git remote add origin <url>
# "upload" your files to your server
git push origin <branch name>
add a comment |
In order to push
code to your git server you need to do the following:
- Add your files which you wish to upload to your server
- commit the changes (with a commit message)
- Add the remote server url
- push the code (upload) to your server
# Track your local changes
git status
# Add the desired files (Choose the suitable one for you)
git add <file name> <file name> <file name>
# Add all files in a given folder
git add <folder name>
# Add all files
git add .
# Add the remote
git remote add origin <url>
# "upload" your files to your server
git push origin <branch name>
add a comment |
In order to push
code to your git server you need to do the following:
- Add your files which you wish to upload to your server
- commit the changes (with a commit message)
- Add the remote server url
- push the code (upload) to your server
# Track your local changes
git status
# Add the desired files (Choose the suitable one for you)
git add <file name> <file name> <file name>
# Add all files in a given folder
git add <folder name>
# Add all files
git add .
# Add the remote
git remote add origin <url>
# "upload" your files to your server
git push origin <branch name>
In order to push
code to your git server you need to do the following:
- Add your files which you wish to upload to your server
- commit the changes (with a commit message)
- Add the remote server url
- push the code (upload) to your server
# Track your local changes
git status
# Add the desired files (Choose the suitable one for you)
git add <file name> <file name> <file name>
# Add all files in a given folder
git add <folder name>
# Add all files
git add .
# Add the remote
git remote add origin <url>
# "upload" your files to your server
git push origin <branch name>
answered Nov 19 '18 at 8:04
CodeWizardCodeWizard
51k126992
51k126992
add a comment |
add a comment |
Note: //Dev/.../ios_project.git
that link will work only if your working repo is placed on same machine with bare (your Dev repo) or if you will mount it directory to your local machine. Else link to repo must start with protocol@ip:
like 'git@xx.xx.xx.xx:/dev/typesetting.git` and if you public key is writen in .ssh/authorized_keys on remote host your pushes will be accepted, else you will must to enter the password.
1) You need to add repository that your boss give you like a remote repository:
git remote add <choose the name of host like prod or dev> //Dev/.../ios_project.git
2) You need to add files that you want to push (or just commit) to stage
git add <file1> <file2>
// or to add all changed and new files
git add .
3) To fix phase of your work
git commit -m 'litle explanation of current changes'
4) after all just push it
git push <name of remote host that you set earlier> <branch to push (like dev for egx.)>
add a comment |
Note: //Dev/.../ios_project.git
that link will work only if your working repo is placed on same machine with bare (your Dev repo) or if you will mount it directory to your local machine. Else link to repo must start with protocol@ip:
like 'git@xx.xx.xx.xx:/dev/typesetting.git` and if you public key is writen in .ssh/authorized_keys on remote host your pushes will be accepted, else you will must to enter the password.
1) You need to add repository that your boss give you like a remote repository:
git remote add <choose the name of host like prod or dev> //Dev/.../ios_project.git
2) You need to add files that you want to push (or just commit) to stage
git add <file1> <file2>
// or to add all changed and new files
git add .
3) To fix phase of your work
git commit -m 'litle explanation of current changes'
4) after all just push it
git push <name of remote host that you set earlier> <branch to push (like dev for egx.)>
add a comment |
Note: //Dev/.../ios_project.git
that link will work only if your working repo is placed on same machine with bare (your Dev repo) or if you will mount it directory to your local machine. Else link to repo must start with protocol@ip:
like 'git@xx.xx.xx.xx:/dev/typesetting.git` and if you public key is writen in .ssh/authorized_keys on remote host your pushes will be accepted, else you will must to enter the password.
1) You need to add repository that your boss give you like a remote repository:
git remote add <choose the name of host like prod or dev> //Dev/.../ios_project.git
2) You need to add files that you want to push (or just commit) to stage
git add <file1> <file2>
// or to add all changed and new files
git add .
3) To fix phase of your work
git commit -m 'litle explanation of current changes'
4) after all just push it
git push <name of remote host that you set earlier> <branch to push (like dev for egx.)>
Note: //Dev/.../ios_project.git
that link will work only if your working repo is placed on same machine with bare (your Dev repo) or if you will mount it directory to your local machine. Else link to repo must start with protocol@ip:
like 'git@xx.xx.xx.xx:/dev/typesetting.git` and if you public key is writen in .ssh/authorized_keys on remote host your pushes will be accepted, else you will must to enter the password.
1) You need to add repository that your boss give you like a remote repository:
git remote add <choose the name of host like prod or dev> //Dev/.../ios_project.git
2) You need to add files that you want to push (or just commit) to stage
git add <file1> <file2>
// or to add all changed and new files
git add .
3) To fix phase of your work
git commit -m 'litle explanation of current changes'
4) after all just push it
git push <name of remote host that you set earlier> <branch to push (like dev for egx.)>
edited Nov 19 '18 at 13:07
answered Nov 19 '18 at 13:00
Andrey SuglobovAndrey Suglobov
1248
1248
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53370099%2fhow-to-connect-and-push-project-to-gitserver%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown