Replace remote url on selection.
This commit is contained in:
parent
e1ca9de0da
commit
91e112ffe2
2 changed files with 5 additions and 2 deletions
|
@ -35,6 +35,7 @@ $ ->
|
||||||
$('a, button', scope).removeClass 'active'
|
$('a, button', scope).removeClass 'active'
|
||||||
$(@).addClass 'active'
|
$(@).addClass 'active'
|
||||||
$('#project_clone', scope).val $(@).data 'clone'
|
$('#project_clone', scope).val $(@).data 'clone'
|
||||||
|
$(".clone").text("").append 'git remote add origin ' + $(@).data 'clone'
|
||||||
|
|
||||||
# Ref switcher
|
# Ref switcher
|
||||||
$('.project-refs-select').on 'change', ->
|
$('.project-refs-select').on 'change', ->
|
||||||
|
|
|
@ -29,7 +29,8 @@
|
||||||
touch README
|
touch README
|
||||||
git add README
|
git add README
|
||||||
git commit -m 'first commit'
|
git commit -m 'first commit'
|
||||||
git remote add origin #{@project.url_to_repo}
|
%span.clone= "git remote add origin #{@project.url_to_repo}"
|
||||||
|
:preserve
|
||||||
git push -u origin master
|
git push -u origin master
|
||||||
|
|
||||||
%fieldset
|
%fieldset
|
||||||
|
@ -37,7 +38,8 @@
|
||||||
%pre.dark
|
%pre.dark
|
||||||
:preserve
|
:preserve
|
||||||
cd existing_git_repo
|
cd existing_git_repo
|
||||||
git remote add origin #{@project.url_to_repo}
|
%span.clone= "git remote add origin #{@project.url_to_repo}"
|
||||||
|
:preserve
|
||||||
git push -u origin master
|
git push -u origin master
|
||||||
|
|
||||||
- if can? current_user, :remove_project, @project
|
- if can? current_user, :remove_project, @project
|
||||||
|
|
Loading…
Reference in a new issue