pushing to public repository using git bash
I know how to push to github ( to my own) but i want to know how to push or add something to some other repository, for example today one of my friends sent me message that he has made a repository for our project and sent me https://github.com/******/****?fbclid=IwAR0tE2DKtuKKzhtqMV-NvS9_YuSkq-abHu7QY2tcESOuFOu1kGT_PxFJR7Y
and he asked me to put our project to that repository, how is that possible ?
i tried ' git push < url > ' and it says 'not valid: is this a git repository?'
git github github-api
add a comment |
I know how to push to github ( to my own) but i want to know how to push or add something to some other repository, for example today one of my friends sent me message that he has made a repository for our project and sent me https://github.com/******/****?fbclid=IwAR0tE2DKtuKKzhtqMV-NvS9_YuSkq-abHu7QY2tcESOuFOu1kGT_PxFJR7Y
and he asked me to put our project to that repository, how is that possible ?
i tried ' git push < url > ' and it says 'not valid: is this a git repository?'
git github github-api
please refer to help.github.com/articles/…
– William Chong
Nov 21 '18 at 7:39
He/She most invite you as the repository contributor.
– Hamed Akhlaghi
Nov 21 '18 at 7:42
add a comment |
I know how to push to github ( to my own) but i want to know how to push or add something to some other repository, for example today one of my friends sent me message that he has made a repository for our project and sent me https://github.com/******/****?fbclid=IwAR0tE2DKtuKKzhtqMV-NvS9_YuSkq-abHu7QY2tcESOuFOu1kGT_PxFJR7Y
and he asked me to put our project to that repository, how is that possible ?
i tried ' git push < url > ' and it says 'not valid: is this a git repository?'
git github github-api
I know how to push to github ( to my own) but i want to know how to push or add something to some other repository, for example today one of my friends sent me message that he has made a repository for our project and sent me https://github.com/******/****?fbclid=IwAR0tE2DKtuKKzhtqMV-NvS9_YuSkq-abHu7QY2tcESOuFOu1kGT_PxFJR7Y
and he asked me to put our project to that repository, how is that possible ?
i tried ' git push < url > ' and it says 'not valid: is this a git repository?'
git github github-api
git github github-api
edited Nov 21 '18 at 7:35
David Jacquel
37.9k377107
37.9k377107
asked Nov 20 '18 at 18:12
waleedd32waleedd32
11419
11419
please refer to help.github.com/articles/…
– William Chong
Nov 21 '18 at 7:39
He/She most invite you as the repository contributor.
– Hamed Akhlaghi
Nov 21 '18 at 7:42
add a comment |
please refer to help.github.com/articles/…
– William Chong
Nov 21 '18 at 7:39
He/She most invite you as the repository contributor.
– Hamed Akhlaghi
Nov 21 '18 at 7:42
please refer to help.github.com/articles/…
– William Chong
Nov 21 '18 at 7:39
please refer to help.github.com/articles/…
– William Chong
Nov 21 '18 at 7:39
He/She most invite you as the repository contributor.
– Hamed Akhlaghi
Nov 21 '18 at 7:42
He/She most invite you as the repository contributor.
– Hamed Akhlaghi
Nov 21 '18 at 7:42
add a comment |
3 Answers
3
active
oldest
votes
- Clone your friend repository:
git clone https://github.com/******/****.git
- Make your own branch:
git checkout -b new_branch_name
- Add or edit code
- Add new new files
git add -A
- Commit files:
`git commit -m "Commit message"
- Push files:
git push -u origin new_branch_name
- Make pull request in github from new_branch_name to master branch of project
add a comment |
The shared url doesn't look like a link to repository.
There are two options provided by github. https and ssh.
https links looks like https://github.com/jacob-nelson/react-native-reusable-ui-components.git
which starts with *https*
ends with .git
ssh links looks like git@github.com:jacob-nelson/react-native-reusable-ui-components.git
which starts with *git@*
ends with .git
After all, your friend must add you as a team member on the given repository and provide necessary permissions, before you are able to push code to given repository.
add a comment |
There are a couple of ways you can push to a github repository that you don't own. The most common way is to create a pull request. However, you can also push to a repository that you are not the primary owner of if you are added by the owner as a collaborator and given permission. You can change the collaborators by going to the repository and clicking Settings
at the top and then Collaborators
on the left.
You can have multiple remotes in your git repo on your local machine. For instance, you can add a remote for your friend's repository like this:
git add remote mybuddy https://github.com/mybuddy/someproject
# Note that there is no ?fbclid=IwAR*** etc
and list them with
git remote -v
Then instead of pushing to origin
you can push to mybuddy
as well.
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%2f53399063%2fpushing-to-public-repository-using-git-bash%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
- Clone your friend repository:
git clone https://github.com/******/****.git
- Make your own branch:
git checkout -b new_branch_name
- Add or edit code
- Add new new files
git add -A
- Commit files:
`git commit -m "Commit message"
- Push files:
git push -u origin new_branch_name
- Make pull request in github from new_branch_name to master branch of project
add a comment |
- Clone your friend repository:
git clone https://github.com/******/****.git
- Make your own branch:
git checkout -b new_branch_name
- Add or edit code
- Add new new files
git add -A
- Commit files:
`git commit -m "Commit message"
- Push files:
git push -u origin new_branch_name
- Make pull request in github from new_branch_name to master branch of project
add a comment |
- Clone your friend repository:
git clone https://github.com/******/****.git
- Make your own branch:
git checkout -b new_branch_name
- Add or edit code
- Add new new files
git add -A
- Commit files:
`git commit -m "Commit message"
- Push files:
git push -u origin new_branch_name
- Make pull request in github from new_branch_name to master branch of project
- Clone your friend repository:
git clone https://github.com/******/****.git
- Make your own branch:
git checkout -b new_branch_name
- Add or edit code
- Add new new files
git add -A
- Commit files:
`git commit -m "Commit message"
- Push files:
git push -u origin new_branch_name
- Make pull request in github from new_branch_name to master branch of project
edited Nov 21 '18 at 8:11
answered Nov 21 '18 at 7:52
IlkoIlko
3951412
3951412
add a comment |
add a comment |
The shared url doesn't look like a link to repository.
There are two options provided by github. https and ssh.
https links looks like https://github.com/jacob-nelson/react-native-reusable-ui-components.git
which starts with *https*
ends with .git
ssh links looks like git@github.com:jacob-nelson/react-native-reusable-ui-components.git
which starts with *git@*
ends with .git
After all, your friend must add you as a team member on the given repository and provide necessary permissions, before you are able to push code to given repository.
add a comment |
The shared url doesn't look like a link to repository.
There are two options provided by github. https and ssh.
https links looks like https://github.com/jacob-nelson/react-native-reusable-ui-components.git
which starts with *https*
ends with .git
ssh links looks like git@github.com:jacob-nelson/react-native-reusable-ui-components.git
which starts with *git@*
ends with .git
After all, your friend must add you as a team member on the given repository and provide necessary permissions, before you are able to push code to given repository.
add a comment |
The shared url doesn't look like a link to repository.
There are two options provided by github. https and ssh.
https links looks like https://github.com/jacob-nelson/react-native-reusable-ui-components.git
which starts with *https*
ends with .git
ssh links looks like git@github.com:jacob-nelson/react-native-reusable-ui-components.git
which starts with *git@*
ends with .git
After all, your friend must add you as a team member on the given repository and provide necessary permissions, before you are able to push code to given repository.
The shared url doesn't look like a link to repository.
There are two options provided by github. https and ssh.
https links looks like https://github.com/jacob-nelson/react-native-reusable-ui-components.git
which starts with *https*
ends with .git
ssh links looks like git@github.com:jacob-nelson/react-native-reusable-ui-components.git
which starts with *git@*
ends with .git
After all, your friend must add you as a team member on the given repository and provide necessary permissions, before you are able to push code to given repository.
answered Nov 21 '18 at 7:44
Jacob NelsonJacob Nelson
486416
486416
add a comment |
add a comment |
There are a couple of ways you can push to a github repository that you don't own. The most common way is to create a pull request. However, you can also push to a repository that you are not the primary owner of if you are added by the owner as a collaborator and given permission. You can change the collaborators by going to the repository and clicking Settings
at the top and then Collaborators
on the left.
You can have multiple remotes in your git repo on your local machine. For instance, you can add a remote for your friend's repository like this:
git add remote mybuddy https://github.com/mybuddy/someproject
# Note that there is no ?fbclid=IwAR*** etc
and list them with
git remote -v
Then instead of pushing to origin
you can push to mybuddy
as well.
add a comment |
There are a couple of ways you can push to a github repository that you don't own. The most common way is to create a pull request. However, you can also push to a repository that you are not the primary owner of if you are added by the owner as a collaborator and given permission. You can change the collaborators by going to the repository and clicking Settings
at the top and then Collaborators
on the left.
You can have multiple remotes in your git repo on your local machine. For instance, you can add a remote for your friend's repository like this:
git add remote mybuddy https://github.com/mybuddy/someproject
# Note that there is no ?fbclid=IwAR*** etc
and list them with
git remote -v
Then instead of pushing to origin
you can push to mybuddy
as well.
add a comment |
There are a couple of ways you can push to a github repository that you don't own. The most common way is to create a pull request. However, you can also push to a repository that you are not the primary owner of if you are added by the owner as a collaborator and given permission. You can change the collaborators by going to the repository and clicking Settings
at the top and then Collaborators
on the left.
You can have multiple remotes in your git repo on your local machine. For instance, you can add a remote for your friend's repository like this:
git add remote mybuddy https://github.com/mybuddy/someproject
# Note that there is no ?fbclid=IwAR*** etc
and list them with
git remote -v
Then instead of pushing to origin
you can push to mybuddy
as well.
There are a couple of ways you can push to a github repository that you don't own. The most common way is to create a pull request. However, you can also push to a repository that you are not the primary owner of if you are added by the owner as a collaborator and given permission. You can change the collaborators by going to the repository and clicking Settings
at the top and then Collaborators
on the left.
You can have multiple remotes in your git repo on your local machine. For instance, you can add a remote for your friend's repository like this:
git add remote mybuddy https://github.com/mybuddy/someproject
# Note that there is no ?fbclid=IwAR*** etc
and list them with
git remote -v
Then instead of pushing to origin
you can push to mybuddy
as well.
answered Nov 21 '18 at 7:44
ConnerConner
23.5k84568
23.5k84568
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%2f53399063%2fpushing-to-public-repository-using-git-bash%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
please refer to help.github.com/articles/…
– William Chong
Nov 21 '18 at 7:39
He/She most invite you as the repository contributor.
– Hamed Akhlaghi
Nov 21 '18 at 7:42