Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# This is the top-level .gitignore file for the WRF model #
# #
# Filenames and wildcards added below will not be tracked by git in any #
# directory in the repository #
# #
# Ignored file types should include executables, build-time temporary files, #
# and other files which should not ever be added to the code repository. #
# #
# USE CAUTION WHEN ADDING WILDCARDS, as some builds use different filename #
# conventions than others #
##############################################################################
*.exe
*.o
*.mod
configure.wrf*
19 changes: 10 additions & 9 deletions tools/commit_form.txt
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
TYPE: bug fix, enhancement, new feature, feature removed, no impact, text only
The first line should be a single-line "purpose" for this change

KEYWORDS: 5 to 10 words related to commit
TYPE: choose one of [bug fix, enhancement, new feature, feature removed, no impact, text only]

SOURCE: Either "developer's name (affiliation)" .XOR. "internal" for a WRF Dev committee member

PURPOSE: single line, usually one sentence
KEYWORDS: 5 to 10 words related to commit, separated by commas

DESCRIPTION OF CHANGES:
Paragraph describing problem, solution, and required changes.
SOURCE: Either "developer's name (affiliation)" .XOR. "internal" for a WRF Dev committee member

LIST OF MODIFIED FILES (annotated if not obvious, not required to be on a single line):
DESCRIPTION OF CHANGES: One or more paragraphs describing problem, solution, and required changes.

TESTS CONDUCTED (explicitly state mandatory, voluntary, and assigned tests, not required to be on a single line):
LIST OF MODIFIED FILES: list of changed files (use `git diff --name-status master` to get formatted list)

TESTS CONDUCTED: Explicitly state if a WTF and or other tests were run, or are pending. For more complicated changes please be explicit!

------------------------------------------------------------------

For github pull requests, the beginning single-line "purpose" should be entered in the title line
See https://github.com/wrf-model/WRF/wiki/Changes-to-the-WRF-code-from-start-to-finish for examples

Description of commit types:
- "bug fix"
Expand Down
66 changes: 66 additions & 0 deletions tools/update_fork.pl
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
#!/usr/bin/perl -w

# Script for easily updating your fork of the main WRF repository
#
# Author: Michael Kavulich, September 2016
# No rights reserved, this script may be used, copied, or modified for any purpose
#
# Instructions:
# 1. Clone your fork of the repository (if you already have a local clone of your fork this is optional)
# git clone https://your_username@github.com/your_username/WRF.git
# 2. Enter the directory of the local clone of your fork
# cd WRF
# 3. Run this script from within the directory structure of your local clone of your fork
# ./update_fork.pl
# You will be asked to enter your Github username: enter it and hit "return".
# 4. If all went well, you should see one of two different messages at the end:
# - If your fork is already up-to-date, you should see "Already up-to-date."
# - If your fork is not up-to-date, this script initiates a fast-forward merge to bring your fork up-to-date with the
# master of the main repository (https://github.com/wrf-model/WRF). Near the end git will print a line of statistics
# describing what changed, which will look something like this:
# 19 files changed, 27 insertions(+), 27 deletions(-)
# followed by a few more lines and this final message:
# Branch master set up to track remote branch master from origin.

# Notes:
# - This is a preliminary version of what will hopefully be a more detailed script in the future. This one only performs fast-forward merges.

use strict;

my $username;
my $go_on = "";

# Prompt user for their username
print "Please enter your Github username:\n";
while ($go_on eq "") {
$go_on = <STDIN>;
chop($go_on);
if ($go_on eq "") {
print "Please enter your Github username:\n";
} else {
$username = $go_on;
}
}

print "Username = $username\n";
my $main_repo = "https://$username\@github.com/wrf-model/WRF.git";
my $fork = "https://$username\@github.com/$username/WRF.git";

# Set main repository as a remote repository named "upstream", per standard git conventions
print "\nStep 1: Setting main repository as a remote repository named 'upstream'\n\n";
! system("git", "remote", "rm", "upstream") or warn "If you see \"error: Could not remove config section 'remote.upstream'\" this is normal! Don't panic!\n";
! system("git", "remote", "add", "upstream", $main_repo) or die "Can not add main repository '$main_repo' for merging: $!\n";

# Set the "push" url for "upstream" to be the user's fork, to avoid accidentally pushing to the main repository
print "\nStep 2: Setting the 'push' url for 'upstream' to the user's fork, to avoid accidentally pushing to the main repository\n\n";
! system("git", "remote", "set-url", "--push", "upstream", $fork) or die "Can not add set push repository '$fork': $!\n";

# Checkout master, fetch "upstream" commits, and perform a fastforward merge
print "\nStep 3: Checking out master, fetching 'upstream' commits, and performing fastforward merge\n\n";
! system("git", "checkout", "master") or die "Can not checkout master: $!\nWhat on earth did you do??\n";
! system("git", "fetch", "upstream", "master") or die "Can not fetch upstream changes from : $!\nWhat on earth did you do??\n";
! system("git", "merge", "--no-commit", "upstream/master") or die "\nCan not perform fastforward merge from upstream/master: $!\n\nTroubleshooting info:\n\n 1. If you receive a message 'fatal: 'upstream/master' does not point to a commit', your git version may be too old. On yellowstone, try `module load git`\n 2. If you receive a different message, there may be intervening changes; if this is expected, issue the command 'git merge upstream/master'\n";

# Finally, push updated master to the Github copy of your fork:
print "\nStep 4: Pushing updated master to fork\n\n";
! system("git", "push", "-u", "origin", "master") or die "\nCan not push updates to origin/master : $!\n";