Re: [git-users] Git workflow recommendations

2020-05-14 Thread SJW
On Thursday, 14 May 2020 15:54:31 UTC+10, Magnus Therning wrote:
>
>
> SJW > writes: 
>
> > New to Git and I'm using a basic workflow that I'm not sure is that good 
> so 
> > wanted to post it here for feedback, critique and suggestions if 
> possible. 
> > 
> > Dev = Local Win 7 PC 
> > Staging = Staging Server 
> > Production = Live Site 
> > 
> >1. Develop on a branch (new-feature) 
> >2. Add, Commit, Push to origin:GitLab 
> >3. Using WinMerge: Compare Dev Branch Code to Staging Code and 
> manually 
> >copy changes to local "staging" code 
> >4. FTP modified Staging files up to Staging server 
> >5. Dev on new branch (new-feature1) and do the same (steps 2-5) * 
> >6. Testing performed on branch (new-feature) and approved for 
> Production 
> >7. Merge approved branch (new-feature) into master 
> >8. Add, Commit, Push to origin:GitLab 
> >9. Using WinMerge: Compare Dev master to Production Code manually and 
> >copy changes to local "Production" code 
> >10. FTP modified Production files up to Production server 
> >11. Delete branch 
> > 
> > * This is where comparison is not great - because new branch doesn't 
> have 
> > previous branch changes and thus is highlighted in WinMerge as different 
> > files (and therefore, I need to check through and make sure changes are 
> > related to current branch and merge into Staging files). This can 
> sometimes 
> > be 3-4 different branches if Testing is slow and regularly, branch 4 
> will 
> > be approved before branch 1. 
> > 
> > I think the issue at point 5 is what has me thinking this is not the 
> best 
> > way. 
> > Also, I don't know how to incorporate hot-fixes - I normally just make 
> > these changes straight to master 
> > 
> > I tried adding a remote for staging and production but of course - this 
> > didn't work because pushing changes to staging will remove the previous 
> > branch changes allowing for testing of only on branch at a time. 
>
> I'd consider using two branches and then say that 
>
> - `master` is what's deployed to staging 
> - `production` is what's deployd to production 
>
> Then 
>
> - skip step 3, you already know what should be in staging, it's what's 
>   on `master` 
> - modify step 4 and use `git archive master` to get an archive of what 
>   should be deployd, get that into staging somehow (I'd prefer `rsync`) 
> - skip steps 6-11, instead run tests agains `master` (what's in staging) 
>   and when you are happy, fast-forward `production` branch to match 
>   `master`, and 
> - deploy `production` in the same way you deployd to staging 
>
> The next step after that would be to set up Gitlab CI so deploys to 
> staging happens automatically on merges/pushes to `master` and to 
> production on pushes to `production`. 
>
> /M 
>
> -- 
> Magnus Therning  OpenPGP: 0x927912051716CE39 
> email: mag...@therning.org  
> twitter: magthe  http://magnus.therning.org/ 
>
> It is better to keep your mouth shut and appear stupid than to open it 
> and remove all doubt. 
>  — Mark Twain 
>

I'm going to try this approach and see how I go.

The only hurdle I can see is comparing master to production - If there are 
4 branches merged into master that aren't in production yet and only 1 of 
those branches is approved for production, how do I merge only "some" of 
the master branch?

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/git-users/4f6daddb-18bb-4a7a-a3db-c64ef5643b1a%40googlegroups.com.


[git-users] best practises : different file config for many deploy

2020-05-14 Thread Paul Demoire
hi,

i would like to get information about best practises about config file included 
in a git project.

My project is built for several companies. So, I have my project in git with 
config file (.ini, .conf...). Is it a good idea to keep these files in the 
project ? The content of these files change for each company...
I wonder where I have to store theses files ?

How to manage the config files for company A, company B...

I would be glad to have advice and example

Paul

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/git-users/efe114e1-d613-478c-a44e-816f180847ea%40googlegroups.com.


Re: [git-users] Use Gitbash

2020-05-14 Thread Alexander Mills
notepad is a text editor. gitbash is a terminal prompt program.  you edit
the code with notepad, and you run the code with bash :)

On Thu, May 14, 2020, 11:05 Богданова Римма  wrote:

> Hello!
>
> I Gitbash never used. Now I uploaded Gitbash for windows. Before I
> installed Notepad++. I want use Notepad++ with Gitbash and I am sending
> screenshots of configuration. How open file from Noteped++ in gitbash and
> use? In book 'Pro git' I nothing find about how use Noteped++ with Gitbash.
> I need more details information how use Notaped++ with Gitbash.
>
> Sincerely, Bogdanova Rimma
>
> --
> You received this message because you are subscribed to the Google Groups
> "Git for human beings" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to git-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/git-users/9b4efca1-8c5c-4332-8449-fcf6c922e6b8%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/git-users/CA%2BKyZp564nDDDSKnbfrOyEbwVDtcb%2BBfh5LuwYMGNSzcX0hC_w%40mail.gmail.com.


[git-users] Use Gitbash

2020-05-14 Thread Богданова Римма


Hello! 

I Gitbash never used. Now I uploaded Gitbash for windows. Before I 
installed Notepad++. I want use Notepad++ with Gitbash and I am sending 
screenshots of configuration. How open file from Noteped++ in gitbash and 
use? In book 'Pro git' I nothing find about how use Noteped++ with Gitbash. 
I need more details information how use Notaped++ with Gitbash.

Sincerely, Bogdanova Rimma

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/git-users/9b4efca1-8c5c-4332-8449-fcf6c922e6b8%40googlegroups.com.


[git-users] how to synchronize repository from local to remote?

2020-05-14 Thread Nicola Cantalupo
Good evening,
I am a beginner.
I have a repository on 
GitHub https://github.com/mygithubusername/victor-hugo which I set to 
private.
I think it's a fork (Correct me if I'm wrong) because I generated it from 
here 
https://app.netlify.com/start/deploy?repository=https://github.com/netlify/victor-hugo
Wanting to work locally on my computer, I have installed git and I am 
currently using Git Bash on Windows.

These are the commands I gave:

git config --global user.name "Dippy Dawg"
git config --global user.email 
"12345678+mygithubusern...@users.noreply.github.com"
git clone https://github.com/mygithubusername/victor-hugo
cd victor-hugo
cd site
git submodule add https://github.com/uicardiodev/hugo-sodium-theme 
themes/sodium

Let's admit that I made unspecified changes to various files and folders, 
how do I update these changes also* on my repository on GitHub?
* Provided that the changes are also updated on the local repository, 
because I'm not sure.

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/git-users/34fd1869-3e48-4d5f-8162-02f66d0321ed%40googlegroups.com.


Re: [git-users] git stash

2020-05-14 Thread Konstantin Khomoutov
On Wed, May 13, 2020 at 08:59:14AM +0200, Tassilo Horn wrote:

> > I gone through the git doc but I am not able to do the git stash
> > particular file
[...]
> so it must be
> 
>   git stash push -m "message " -- filepath
> 
> That filespecs go after a double-dash is quite common with git.  For
> example, if you want to checkout only some file of a given revision,
> you'd also use something like
> 
>   git checkout  -- path/to/file
[...]

I would add that "--" is common not only with Git but in many
command-line programs — especially those developed under the GNU
umbrella.

The "--" token commonly means "whatever arguments come after this must
not be interpreted as options".
This approach allows to have commands with the semantics like

  command [options] [aguments]

In this case, the implementation of `command` might have hard time
deciding when the last option ends and the first agument comes in —
especially in the case of an arument which resembles an option by
starting with the "-" character.
Using of "--" removes the confusion so we can run our `command` like

  command --first-option --second-opton -- --weird-file-name

and have no problem with separating the two options from the argument
which has quite a strange look ;-)

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/git-users/20200514113352.m75nrk3aq3bmmd5d%40carbon.